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<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/os.h></CODE></PRE> 16 <DD> 17<PRE><CODE>void OSInitSemaphore( OSSemaphore* sem, s32 count );</CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" cellpadding="3" cellspacing="0.1"> 21 <TBODY> 22 <TR> 23<TD width="120" bgcolor="#ffffe8"><I><B><CODE><STRONG><EM><CODE>sem</CODE></EM></STRONG></CODE></B></I></TD> 24<TD width="520">Pointer to a semaphore.</TD> 25 </TR> 26 <TR> 27<TD width="120" bgcolor="#ffffe8"><I><B><CODE><STRONG><EM><code>count</code></EM></STRONG></CODE></B></I></TD> 28<TD width="520">Initial semaphore count. </TD> 29 </TR> 30 </TBODY> 31</TABLE> 32<H2>Return Values</H2> 33<P>None.</P> 34<H2>Description</H2> 35<P>Initializes semaphores. <STRONG><EM><code>count</code></EM></STRONG> specifies the initial value of the semaphore count. Although <STRONG><EM><code>count</code></EM></STRONG> can be a negative value, it should usually be ≥ 0.</P> 36 37<H2>See Also</H2> 38<P><a href="../toc.html#Thread" target="contents">Thread Functions</a>, <a href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</a></P> 39<H2>Revision History</H2> 40<P>2006/03/01 Initial version.</P> 41<hr> 42<P>CONFIDENTIAL</p> 43</BODY> 44</HTML>