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<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 7<TITLE>OSWaitSemaphore</TITLE> 8</HEAD> 9<BODY> 10<H1>OSWaitSemaphore</H1> 11 12<H2>Syntax</H2> 13<dl><dd><pre class="construction"> 14#include <revolution/os.h> 15 16s32 OSWaitSemaphore( OSSemaphore* sem ); 17</pre></dd></dl> 18 19<H2>Arguments</H2> 20<TABLE class="arguments" border="1" > 21 <TBODY> 22 <TR> 23<TH><STRONG><EM><CODE>sem</CODE></EM></STRONG></TH> 24<TD>Pointer to a semaphore.</TD> 25 </TR> 26 </TBODY> 27</TABLE> 28 29<H2>Return Values</H2> 30<P>The previous semaphore count.</P> 31 32<H2>Description</H2> 33<P>Decrements the specified semaphore count. If the semaphore count is less than zero, the calling thread blocks until it can decrement the semaphore count.</P> 34 35<H2>See Also</H2> 36<P class="reference"> 37<A href="../toc.html#Thread" target="contents">Thread Functions</A>, 38<A href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</A> 39</P> 40 41<H2>Revision History</H2> 42<P> 432006/03/01 Initial version.<br> 44</P> 45 46<hr><p>CONFIDENTIAL</p></body> 47</HTML>