...
os.h/os_cpu_a.asm
Prototype
Code Block |
---|
void OSStartHighRdy (void) |
Arguments
None
Returned Values
...
The pseudocode for OSStartHighRdy()
is shown below.
Code Block | ||
---|---|---|
| ||
OSStartHighRdy:
OSTaskSwHook(); (1)
SP = OSTCBHighRdyPtr->StkPtr; (2)
Pop CPU registers off the task's stack; (3)
Return from interrupt; (4) |
Panel | ||
---|---|---|
| ||
(1) When called, (2) The CPU stack pointer register is loaded with the top-of-stack (TOS) of the task being started. The TOS is found in the (3) The registers are popped from the task’s stack frame. Recall that the registers should have been placed on the stack frame in the same order as if they were pushed at the beginning of an interrupt service routine. (4) You must execute a return from interrupt. This starts the task as if it was resumed when returning from a real interrupt. |