Description
OSCtxSw()
is called from the macro OS_TASK_SW()
, which in turn is called from OSSched()
to perform a task-level context switch. Interrupts are disabled when OSCtxSw()
is called.
Prior to calling OSCtxSw()
, OSTCBCurPtr
to point at the OS_TCB
of the task that is being switched out, and OSSched()
sets OSTCBHighRdyPtr
to point at the OS_TCB
of the task being switched in.
Files
os.h/os_cpu_a.asm
Prototype
Arguments
None
Returned Values
None
Required Configuration
None
Callers
OSSched()
.
Notes/Warnings
None
Example Usage
The pseudocode for OSCtxSw()
follows: