4 EXTERN vTaskSwitchContext
\r
6 PUBLIC vPortYieldProcessor
\r
7 PUBLIC vPortStartFirstTask
\r
9 #include "ISR_Support.h"
\r
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
12 ; Starting the first task is just a matter of restoring the context that
\r
13 ; was created by pxPortInitialiseStack().
\r
14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
15 vPortStartFirstTask:
\r
18 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
19 ; Manual context switch function. This is the SWI hander.
\r
20 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
21 vPortYieldProcessor:
\r
22 ADD LR, LR, #4 ; Add 4 to the LR to make the LR appear exactly
\r
23 ; as if the context was saved during and IRQ
\r
26 portSAVE_CONTEXT ; Save the context of the current task...
\r
27 LDR R0, =vTaskSwitchContext ; before selecting the next task to execute.
\r
30 portRESTORE_CONTEXT ; Restore the context of the selected task.
\r