<html> <head> <title>Global Functions in Namespace in Sourcefile semaphor.h</title> <link rel="stylesheet" type="text/css" href="../cpp.css"> </head> <body> <div id="adc-cppref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="1" cellspacing="0"> <tr align="center" valign="top"> <td class="navimain"> <a href="../index.html">Overview</a> </td> <td class="navimain"> <a href="index.html">Namespace</a> </td> <td class="navimainnone"> Class </td> <td class="navimain"> <a href="../index-files/index-1.html">Index</a> </td> <td class="navimain"> <a href="../help.html">Help</a> </td> </tr> </table> <table class="navisub" cellpadding="0" cellspacing="3"></table> <hr> <div class="title"><h2>Global Functions in Global Namespace C++<br> in Sourcefile semaphor.h</h2> </div><hr> <dl class="member"> <dt class="member"><a name="osl_acquireSemaphore-1024"> </a>osl_acquireSemaphore</dt> <dd class="member"><dl> <dt class="simple">extern "C"<br> <a href="t-sal_Bool.html">sal_Bool</a> <strong>osl_acquireSemaphore</strong>(</dt> <dd><table class="param-table"> <tr> <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> <td> Semaphore );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>acquire()decreases the count. It will block if it tries to decrease below zero. </dd> <dt>Return</dt> <dd>False if the system-call failed. </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="osl_createSemaphore-1022"> </a>osl_createSemaphore</dt> <dd class="member"><dl> <dt class="simple">extern "C"<br> <a href="t-oslSemaphore.html">oslSemaphore</a> <strong>osl_createSemaphore</strong>(</dt> <dd><table class="param-table"> <tr> <td><a href="t-sal_uInt32.html">sal_uInt32</a> </td> <td> initialCount );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Creates a semaphore.<BR> </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">InitialCount</td> <td><pre>denotes the starting value the semaphore. If you set it to zero, the first acquire() blocks. Otherwise InitialCount acquire()s are immedeatly successfull. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd>0 if the semaphore could not be created, otherwise a handle to the sem. </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="osl_destroySemaphore-1023"> </a>osl_destroySemaphore</dt> <dd class="member"><dl> <dt class="simple">extern "C"<br> void <strong>osl_destroySemaphore</strong>(</dt> <dd><table class="param-table"> <tr> <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> <td> Semaphore );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Release the OS-structures and free semaphore data-structure </dd> <dt>Return</dt> <dd>fbbb </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="osl_releaseSemaphore-1026"> </a>osl_releaseSemaphore</dt> <dd class="member"><dl> <dt class="simple">extern "C"<br> <a href="t-sal_Bool.html">sal_Bool</a> <strong>osl_releaseSemaphore</strong>(</dt> <dd><table class="param-table"> <tr> <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> <td> Semaphore );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>release()increases the count. </dd> <dt>Return</dt> <dd>False if the system-call failed. </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="osl_tryToAcquireSemaphore-1025"> </a>osl_tryToAcquireSemaphore</dt> <dd class="member"><dl> <dt class="simple">extern "C"<br> <a href="t-sal_Bool.html">sal_Bool</a> <strong>osl_tryToAcquireSemaphore</strong>(</dt> <dd><table class="param-table"> <tr> <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> <td> Semaphore );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Description</dt> <dd>tryToAcquire()tries to decreases the count. It will return with False if it would decrease the count below zero. (When acquire() would block.) If it could successfully decrease the count, it will return True. </dd> </dl> </dd> </dl> <hr> <a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-cppref" --> </body> </html>