1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=utf-8">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>OSSuspendThread</title>
10</head>
11
12<body>
13
14<h1>OSSuspendThread</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">#include &lt;revolution/os.h&gt;
18
19s32 OSSuspendThread (OSThread* thread);
20</pre></dd></dl>
21
22<h2>Arguments</h2>
23<TABLE class="arguments" border="1" >
24  <tr>
25<TH>thread</TH>
26<TD>Pointer to thread to suspend.</TD>
27  </tr>
28</TABLE>
29
30<h2>Return Values</h2>
31<p>The previous suspend counter of the thread. The thread is suspended if the counter is greater than zero.</p>
32
33<h2>Description</h2>
34<p>Suspends the specified thread (incremental).</p>
35
36<p>The operating system maintains a counter of the number of times the <code>OSSuspendThread</code> function has been called. Calling the <code>OSResumeThread</code> function will decrement that counter. While the counter is greater than zero, the thread will not be scheduled to execute.</p>
37
38<p>This function sometimes puts the current thread to sleep, so it cannot be called from callback functions. For precautions when calling similar functions, refer to <a href="../Interrupt/intro.html">Interrupts and Callback Functions</a>.</p>
39
40<h2>See Also</h2>
41<P class="reference">
42<A href="../toc.html#Thread" target="contents">Thread Functions</A><BR><A href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</A><BR> <a href="OSIsThreadSuspended.html">OSIsThreadSuspended</a><BR> <a href="OSResumeThread.html">OSResumeThread</a><BR> <a href="../Interrupt/intro.html">Interrupts and Callback Functions</a>
43</p>
44
45<h2>Revision History</h2>
46<P>
472007/09/25 Added information on the sleeping status of threads.<br>2006/03/01 Initial version.<br>
48</p>
49
50<hr><p>CONFIDENTIAL</p></body>
51</html>