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_SleepThread</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_SleepThread <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_SleepThread( OSThreadQueue* queue );</CODE></PRE> 17</DL> 18<H2>Arguments</H2> 19<TABLE border="1" width="100%"> 20 <TBODY> 21 <TR> 22 <TD width="13%"><EM><STRONG>queue</STRONG></EM></TD> 23 <TD width="87%">Pointer to the thread queue that registers the current thread. 24 If NULL, it is not registered to the thread queue.</TD> 25 </TR> 26 </TBODY> 27</TABLE> 28<H2>Return Values</H2> 29<P>None.</P> 30<H2>Description</H2> 31<P>Pauses current thread and registers it into the thread queue designated by <code><em><strong>queue</strong></em></code></P> 32<P>The thread stays in the suspended state until the <CODE><A href="OS_WakeupThread.html">OS_WakeupThread</A></CODE> function is called with this <CODE>queue</CODE> argument. However, if this thread was specified with <a href="OS_WakeupThreadDirect.html"><code>OS_WakeupThreadDirect()</code></a>, the paused state changes to the executable state.</P> 33<P>When <em><strong><code>queue</code></strong></em> is NULL, it is not registered to the thread queue. It wakes up by using <a href="OS_WakeupThreadDirect.html"><code>OS_WakeupThreadDirect()</code></a> in other threads.</P> 34<H2>See Also</H2> 35<P><CODE><A href="OS_InitThread.html">OS_InitThread</A>, <A href="OS_CreateThread.html">OS_CreateThread</A>, <A href="OS_WakeupThread.html">OS_WakeupThread</A>, <A href="OS_WakeupThreadDirect.html">OS_WakeupThreadDirect</A><BR> <A href="OS_Sleep.html">OS_Sleep</A><BR></CODE></P> 36<H2>Revision History</H2> 37<P>2004/07/18 Added the description of the situation when queue is NULL. <BR>2003/12/01 Initial version.</P> 38<hr><p>CONFIDENTIAL</p></body> 39</HTML>