OSCtxSw()
(see os_cpu_a.asm
) is called when the task level scheduler (OSSched()
) determines that a new high priority task needs to execute. The figure below shows the state of several μCµC/OS-III variables and data structures just prior to calling OSCtxSw()
.
The figure below shows the steps involved in performing the context switch as implemented by OSCtxSw()
.