| <html> |
| <head> |
| <title>Global Functions in Namespace in Sourcefile semaphor.h</title> |
| <style> h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; } |
| h2 { font-family:"Arial"; font-size:16pt; margin-top:3pt; margin-bottom:5pt; } |
| h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; } |
| h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dl { margin-top:1pt; margin-bottom:1pt; } |
| dl.member { margin-top:1pt; margin-bottom:1pt; background-color:#eeeeff; } |
| dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; } |
| dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; } |
| dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; } |
| p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; } |
| pre { font-family: Times, serif; font-size:10pt; margin-top:1pt; margin-bottom:1pt; } |
| tr { font-size:10pt; } |
| td { font-size:10pt; } |
| </style> |
| |
| <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> |
| </head> |
| <body bgcolor="#ffffff"> |
| <a name="_top_"> </a> |
| <table border="0" cellpadding="1" cellspacing="0"> |
| <tr align="center" valign="top"> |
| <td bgcolor="#eeeeff"> <a href="../index.html" alt><font family="Arial" color="#000000" size="+1"><b>Overview</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <a href="index.html" alt><font family="Arial" color="#000000" size="+1"><b>Namespace</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <font family="Arial" color="#000000" size="+1">Class</font> </td> |
| <td bgcolor="#eeeeff"> <a href="../index-files/index-1.html" alt><font family="Arial" color="#000000" size="+1"><b>Index</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <a href="../help.html" alt><font family="Arial" color="#000000" size="+1"><b>Help</b></font></a> </td> |
| </tr> |
| </table> |
| <table cellpadding="0" cellspacing="3"></table> |
| <hr> |
| <div align="center" style="background-color:#ccccff; line-height:26pt;"><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-226"> </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> |
| <tr> |
| <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> |
| <td> Semaphore );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd><pre>acquire()decreases the count. It will block if it tries to |
| decrease below zero. |
| </pre></dd> |
| <dt>Return</dt> |
| <dd><pre>False if the system-call failed. |
| </pre></dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="osl_createSemaphore-225"> </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> |
| <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 border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd><pre>Creates a semaphore.<BR> |
| </pre></dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">InitialCount</td> |
| <td><pre><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></pre></td> |
| </tr> |
| </table> |
| </dd> |
| <dt>Return</dt> |
| <dd><pre>0 if the semaphore could not be created, otherwise a handle to the sem. |
| </pre></dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="osl_destroySemaphore-226"> </a> |
| osl_destroySemaphore</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>osl_destroySemaphore</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> |
| <td> Semaphore );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd><pre>Release the OS-structures and free semaphore data-structure |
| </pre></dd> |
| <dt>Return</dt> |
| <dd><pre>fbbb |
| </pre></dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="osl_releaseSemaphore-226"> </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> |
| <tr> |
| <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> |
| <td> Semaphore );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd><pre>release()increases the count. |
| </pre></dd> |
| <dt>Return</dt> |
| <dd><pre>False if the system-call failed. |
| </pre></dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="osl_tryToAcquireSemaphore-226"> </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> |
| <tr> |
| <td><a href="t-oslSemaphore.html">oslSemaphore</a> </td> |
| <td> Semaphore );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd><pre>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. |
| </pre></dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.</p> |
| </body> |