Thread context switching for ImageCraft ICCAVR. More...
Data Structures | |
struct | SWITCHFRAME |
ARM7TDMI GCC context switch frame layout. More... | |
struct | ENTERFRAME |
Thread entry frame layout. More... | |
Functions | |
void | NutThreadSwitch (void) |
Switch to another thread. | |
HANDLE | NutThreadCreate (uint8_t *name, void(*fn)(void *), void *arg, size_t stackSize) |
Thread context switching for ImageCraft ICCAVR.
void NutThreadSwitch | ( | void | ) |
Switch to another thread.
Stop the current thread, saving its context. Then start the one with the highest priority, which is ready to run.
Application programs typically do not call this function.
References runningThread, runQueue, _NUTTHREADINFO::td_sp, _NUTTHREADINFO::td_state, and TDS_RUNNING.
References __os_trf, __os_trs, ENTERFRAME::cef_arghi, ENTERFRAME::cef_arglo, ENTERFRAME::cef_pchi, ENTERFRAME::cef_pclo, ENTERFRAME::cef_r1, ENTERFRAME::cef_rampz, ENTERFRAME::cef_sreg, ENTERFRAME::cef_yhi, ENTERFRAME::cef_ylo, SWITCHFRAME::csf_pchi, SWITCHFRAME::csf_pclo, DEADBEEF, fprintf(), memcpy(), NutDumpThreadList(), NutEnterCritical, NutExitCritical, NutStackAlloc, NutThreadAddPriQueue(), nutThreadList, NutThreadSwitch(), runningThread, runQueue, _NUTTHREADINFO::td_memory, _NUTTHREADINFO::td_name, _NUTTHREADINFO::td_next, _NUTTHREADINFO::td_priority, _NUTTHREADINFO::td_queue, _NUTTHREADINFO::td_sp, _NUTTHREADINFO::td_state, _NUTTHREADINFO::td_timer, and TDS_READY.