#include <nitro/os.h>
void OS_JoinThread( OSThread* thread );
thread | Points to the thread to be joined. |
None.
Joins a thread and waits until the specified thread has terminated If the specified thread has already terminated, this function doesn't do anything.
Within this function, the thread that is called registers itself in the thread queue specified by the specified thread. It then goes to sleep in response to OS_SleepThread()
. When the specified thread is terminated by OS_ExitThread()
, it changes the state of all threads registered in the thread queue to executable and reschedules them, regardless of their status.
Multiple threads may be joined to a single thread using OS_JoinThread()
.
OS_InitThread, OS_SleepThread, OS_ExitThread
11/10/2004 Simplified description
06/26/2004 Initial version