Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > bdbf07027827e6ad7d9208f8a9eaea97 > files > 154

apr-docs-1.2.7-11.el5_6.5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: Reader/Writer Lock Routines</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<h1>Reader/Writer Lock Routines<br>
<small>
[<a class="el" href="group___a_p_r.html">Apache Portability Runtime library</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gdb241ea13ebb9b0907dc57c3672f2c44">apr_thread_rwlock_create</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> **rwlock, <a class="el" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gbbfdf6010eaf9951c7cd1aea3deb8382">apr_thread_rwlock_rdlock</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g50c66db7a5d1fbeb6997ff5760c9fc4f">apr_thread_rwlock_tryrdlock</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g74d421aec4dc6b10b4c4c8b5874320be">apr_thread_rwlock_wrlock</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g2a4ce0006c68fe97bea900e56aea1ee4">apr_thread_rwlock_trywrlock</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g25fc72e2704eeb9274ddeaa5f31f73e0">apr_thread_rwlock_unlock</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g8c1a30370ff66eabbaf38a1f502015d7">apr_thread_rwlock_destroy</a> (<a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *rwlock)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#g2126a0595e25d1df9ab3f733d7e4857d">apr_thread_rwlock_pool_get</a> (const <a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *thethread_rwlock)</td></tr>

</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g8b3e1aa443d06e969b0f7ea50ee8f5e4"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_t" ref="g8b3e1aa443d06e969b0f7ea50ee8f5e4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> <a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Opaque read-write thread-safe lock. 
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gdb241ea13ebb9b0907dc57c3672f2c44"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_create" ref="gdb241ea13ebb9b0907dc57c3672f2c44" args="(apr_thread_rwlock_t **rwlock, apr_pool_t *pool)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_create           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> **&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *&nbsp;</td>
          <td class="paramname"> <em>pool</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create and initialize a read-write lock that can be used to synchronize threads. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the memory address where the newly created readwrite lock will be stored. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pool</em>&nbsp;</td><td>the pool from which to allocate the mutex. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g8c1a30370ff66eabbaf38a1f502015d7"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_destroy" ref="g8c1a30370ff66eabbaf38a1f502015d7" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_destroy           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy the read-write lock and free the associated memory. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the rwlock to destroy. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g2126a0595e25d1df9ab3f733d7e4857d"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_pool_get" ref="g2126a0595e25d1df9ab3f733d7e4857d" args="(const apr_thread_rwlock_t *thethread_rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a>* apr_thread_rwlock_pool_get           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>thethread_rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the pool used by this thread_rwlock. <dl compact><dt><b>Returns:</b></dt><dd>apr_pool_t the pool </dd></dl>

</div>
</div><p>
<a class="anchor" name="gbbfdf6010eaf9951c7cd1aea3deb8382"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_rdlock" ref="gbbfdf6010eaf9951c7cd1aea3deb8382" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_rdlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Acquire a shared-read lock on the given read-write lock. This will allow multiple threads to enter the same critical section while they have acquired the read lock. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the read-write lock on which to acquire the shared read. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g50c66db7a5d1fbeb6997ff5760c9fc4f"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_tryrdlock" ref="g50c66db7a5d1fbeb6997ff5760c9fc4f" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_tryrdlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempt to acquire the shared-read lock on the given read-write lock. This is the same as <a class="el" href="group__apr__thread__rwlock.html#gbbfdf6010eaf9951c7cd1aea3deb8382">apr_thread_rwlock_rdlock()</a>, only that the function fails if there is another thread holding the write lock, or if there are any write threads blocking on the lock. If the function fails for this case, APR_EBUSY will be returned. Note: it is important that the <a class="el" href="group___a_p_r___s_t_a_t_u_s___i_s.html#g88ed418f02b78468b542932ed2cb2c29">APR_STATUS_IS_EBUSY(s)</a> macro be used to determine if the return value was APR_EBUSY, for portability reasons. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the rwlock on which to attempt the shared read. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g2a4ce0006c68fe97bea900e56aea1ee4"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_trywrlock" ref="g2a4ce0006c68fe97bea900e56aea1ee4" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_trywrlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempt to acquire the exclusive-write lock on the given read-write lock. This is the same as <a class="el" href="group__apr__thread__rwlock.html#g74d421aec4dc6b10b4c4c8b5874320be">apr_thread_rwlock_wrlock()</a>, only that the function fails if there is any other thread holding the lock (for reading or writing), in which case the function will return APR_EBUSY. Note: it is important that the <a class="el" href="group___a_p_r___s_t_a_t_u_s___i_s.html#g88ed418f02b78468b542932ed2cb2c29">APR_STATUS_IS_EBUSY(s)</a> macro be used to determine if the return value was APR_EBUSY, for portability reasons. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the rwlock on which to attempt the exclusive write. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g25fc72e2704eeb9274ddeaa5f31f73e0"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_unlock" ref="g25fc72e2704eeb9274ddeaa5f31f73e0" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_unlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release either the read or write lock currently held by the calling thread associated with the given read-write lock. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the read-write lock to be released (unlocked). </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g74d421aec4dc6b10b4c4c8b5874320be"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_wrlock" ref="g74d421aec4dc6b10b4c4c8b5874320be" args="(apr_thread_rwlock_t *rwlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> apr_thread_rwlock_wrlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#g8b3e1aa443d06e969b0f7ea50ee8f5e4">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Acquire an exclusive-write lock on the given read-write lock. This will allow only one single thread to enter the critical sections. If there are any threads currently holding the read-lock, this thread is put to sleep until it can have exclusive access to the lock. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rwlock</em>&nbsp;</td><td>the read-write lock on which to acquire the exclusive write. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue May 31 12:20:26 2011 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>