Nut/OS  5.0.5
API Reference
ImageCraft Context Switching for AVR CPUs

Thread context switching for ImageCraft ICCAVR. More...

Collaboration diagram for ImageCraft Context Switching for AVR CPUs:

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)

Detailed Description

Thread context switching for ImageCraft ICCAVR.


Function Documentation

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.

Note:
CPU interrupts must be disabled before calling this function.

References runningThread, runQueue, _NUTTHREADINFO::td_sp, _NUTTHREADINFO::td_state, and TDS_RUNNING.