A thread state transition diagram is shown below.
Note that items such as the prefixes of function names have been omitted in the diagram for simplicity. For example, Create() in the diagram should be read as OSCreateThread().
The primary functions that cause transitions in a thread's state are listed below.
void OSYieldThread ( void ); BOOL OSCreateThread ( OSThread* thread, void* (*func)(void*), void* param, void* stack, u32 stackSize, OSPriority priority, u16 attr ); void OSExitThread ( void* val ); void OSCancelThread ( OSThread* thread ); s32 OSResumeThread ( OSThread* thread ); s32 OSSuspendThread( OSThread* thread ); void OSSleepThread ( OSThreadQueue* queue ); void OSWakeupThread ( OSThreadQueue* queue ); void OSDetachThread ( OSThread* thread );
2008/09/08 Updated the transition diagram for threads and added the OSDetachThread function to functions that cause a state transition.
2007/07/30 Initial version.
CONFIDENTIAL