File tree Expand file tree Collapse file tree 3 files changed +10
-27
lines changed
os/freertos/portable/Synopsys/ARC_EM_SECURESHIELD Expand file tree Collapse file tree 3 files changed +10
-27
lines changed Original file line number Diff line number Diff line change 7979#ifdef __GNU__
8080extern void gnu_printf_setup (void );
8181#endif
82+
83+ extern unsigned int context_switch_reqflg ;
84+
85+ static void trap_task_switch_handler (void )
86+ {
87+ context_switch_reqflg = 1 ; // require a context switch
88+ }
89+
8290/**
8391 * \brief freertos related cpu exception initialization, all the interrupts handled by freertos must be not
8492 * fast irqs. If fiq is needed, please install the default firq_exc_entry or your own fast irq entry into
8593 * the specific interrupt exception.
8694 */
8795void freertos_exc_init (void )
8896{
89-
97+ exc_handler_install ( EXC_NO_TRAP , ( EXC_HANDLER ) trap_task_switch_handler );
9098#ifdef __GNU__
9199 gnu_printf_setup ();
92100#endif
Original file line number Diff line number Diff line change 8282#include "arc.h"
8383#include "arc_asm_common.h"
8484
85- / *
86- * task dispatcher
87- *
88- * /
89- .text
90- . align 4
91- . global dispatch
92- dispatch:
93- / *
94- * the pre - conditions of this routine are task context , CPU is
95- * locked , dispatch is enabled.
96- * /
97- sr blink , [ AUX_ERRET ]
98- lr blink , [ AUX_STATUS32 ]
99- sr blink , [ AUX_ERSTATUS ]
100- EXCEPTION_PROLOGUE
101- SAVE_CALLEE_REGS
102- ld r0 , [ pxCurrentTCB ]
103- b dispatcher
104-
105-
10685/ *
10786 * start dispatch
10887 * /
Original file line number Diff line number Diff line change @@ -286,11 +286,7 @@ void vPortYieldFromIsr(void)
286286/* ----------------------------------------------------------------------------*/
287287void vPortYield (void )
288288{
289- unsigned int status32 ;
290-
291- status32 = cpu_lock_save ();
292- dispatch ();
293- cpu_unlock_restore (status32 );
289+ Asm ("trap_s 1" );
294290}
295291
296292/* --------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments