1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_JoinThread</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_JoinThread <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <PRE><CODE>#include <nitro/os.h></CODE></PRE> 16 <PRE><CODE>void OS_JoinThread( OSThread* thread ); 17 </CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23 <TD width="13%"><EM><STRONG>thread</STRONG></EM></TD> 24 <TD width="87%">Points to the thread to be joined.</TD> 25 </TR> 26 </TBODY> 27</TABLE> 28<H2>Return Values</H2> 29<P>None.</P> 30<H2>Description</H2> 31<P>Joins a thread and waits until the specified thread has terminated Does nothing if the specified thread has already terminated.</P> 32<P>Within this function, the thread that is called registers itself in the thread queue specified by the specified <B><I>thread</I></B>. It then goes to sleep in response to <A href="OS_SleepThread.html"><CODE>OS_SleepThread()</CODE></A>. When the specified thread is terminated by <code><a href="OS_ExitThread.html">OS_ExitThread()</a></code>, it changes the state of all threads registered in the thread queue to executable and reschedules them, regardless of their status.</P> 33<P>Multiple threads may be joined to a single thread using <code>OS_JoinThread()</code>.</P> 34<H2>See Also</H2> 35<P><CODE><A href="OS_InitThread.html">OS_InitThread</A>, <A href="OS_SleepThread.html">OS_SleepThread</A>, <A href="OS_ExitThread.html">OS_ExitThread</A><BR></CODE></P> 36<H2>Revision History</H2> 37<P>2004/11/10 Simplified description. <BR>2004/06/26 Initial version.</P> 38<hr><p>CONFIDENTIAL</p></body> 39</HTML>