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 http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>OSInitSemaphore</TITLE>
9</HEAD>
10<BODY>
11<H1>OSInitSemaphore</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/os.h&gt;
16
17void OSInitSemaphore( OSSemaphore* sem, s32 count );
18</pre></dd></dl>
19
20<H2>Arguments</H2>
21<TABLE class="arguments" border="1" >
22  <TBODY>
23    <TR>
24<TH><STRONG><EM><CODE>sem</CODE></EM></STRONG></TH>
25<TD>Pointer to a semaphore.</TD>
26    </TR>
27    <TR>
28<TH>count</TH>
29<TD>Initial semaphore count.&nbsp;</TD>
30    </TR>
31  </TBODY>
32</TABLE>
33
34<H2>Return Values</H2>
35<P>None.</P>
36
37<H2>Description</H2>
38<P>Initializes semaphores. The initial semaphore count is specified by <SPAN class="argument">count</SPAN>. Be aware that although <SPAN class="argument">count</SPAN> can be negative, it must be greater than or equal to zero.</P>
39
40<H2>See Also</H2>
41<P class="reference">
42<A href="../toc.html#Thread" target="contents">Thread Functions</A>,
43<A href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</A>
44</P>
45
46<H2>Revision History</H2>
47<P>
482006/03/01 Initial version.<br>
49</P>
50
51<hr><p>CONFIDENTIAL</p></body>
52</HTML>