Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > e0236b39c613e86bcee76bad717809a5 > files > 228

libapr-devel-1.4.6-0.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Apache Portable Runtime: Reader/Writer Lock Routines</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</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>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="contents">
<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 colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gadae9c87ad957112406b48947cb1f0e93">apr_thread_rwlock_create</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> **rwlock, <a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gad44a106cd9a81eef362d31837ca7018f">apr_thread_rwlock_rdlock</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#ga2bbbc137f5c610e31bf87fd0a60c428e">apr_thread_rwlock_tryrdlock</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#ga91543c9f97a6a1265524a5a8f55fef31">apr_thread_rwlock_wrlock</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#ga54c04596f8a1f44630bdda5a25578d63">apr_thread_rwlock_trywrlock</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gac7b31112d972abfcac30252e622eb040">apr_thread_rwlock_unlock</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#ga136118166f50091fb30011d837a4cdcc">apr_thread_rwlock_destroy</a> (<a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *rwlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#ga3e78c5d8f2e7f4cdad46e912e68edd33">apr_thread_rwlock_pool_get</a> (const <a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *thethread_rwlock)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gaede9b908e3d9e6a8aed7bd10d0ae0498"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_t" ref="gaede9b908e3d9e6a8aed7bd10d0ae0498" 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#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> <a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Opaque read-write thread-safe lock. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadae9c87ad957112406b48947cb1f0e93"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_create" ref="gadae9c87ad957112406b48947cb1f0e93" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">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#gaf137f28edcf9a086cd6bc36c20d7cdfb">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></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Note: The following operations have undefined results: unlocking a read-write lock which is not locked in the calling thread; write locking a read-write lock which is already locked by the calling thread; destroying a read-write lock more than once; clearing or destroying the pool from which a <b>locked</b> read-write lock is allocated. Create and initialize a read-write lock that can be used to synchronize threads. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga136118166f50091fb30011d837a4cdcc"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_destroy" ref="ga136118166f50091fb30011d837a4cdcc" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destroy the read-write lock and free the associated memory. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3e78c5d8f2e7f4cdad46e912e68edd33"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_pool_get" ref="ga3e78c5d8f2e7f4cdad46e912e68edd33" 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#gaf137f28edcf9a086cd6bc36c20d7cdfb">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#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>thethread_rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the pool used by this thread_rwlock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>apr_pool_t the pool </dd></dl>

</div>
</div>
<a class="anchor" id="gad44a106cd9a81eef362d31837ca7018f"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_rdlock" ref="gad44a106cd9a81eef362d31837ca7018f" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_rdlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></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. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2bbbc137f5c610e31bf87fd0a60c428e"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_tryrdlock" ref="ga2bbbc137f5c610e31bf87fd0a60c428e" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_tryrdlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></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#gad44a106cd9a81eef362d31837ca7018f">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#gabb92ad7b6ef304132de70e9e5cbaa896">APR_STATUS_IS_EBUSY(s)</a> macro be used to determine if the return value was APR_EBUSY, for portability reasons. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga54c04596f8a1f44630bdda5a25578d63"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_trywrlock" ref="ga54c04596f8a1f44630bdda5a25578d63" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_trywrlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></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#ga91543c9f97a6a1265524a5a8f55fef31">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#gabb92ad7b6ef304132de70e9e5cbaa896">APR_STATUS_IS_EBUSY(s)</a> macro be used to determine if the return value was APR_EBUSY, for portability reasons. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac7b31112d972abfcac30252e622eb040"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_unlock" ref="gac7b31112d972abfcac30252e622eb040" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_unlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></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. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga91543c9f97a6a1265524a5a8f55fef31"></a><!-- doxytag: member="apr_thread_rwlock.h::apr_thread_rwlock_wrlock" ref="ga91543c9f97a6a1265524a5a8f55fef31" 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#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_thread_rwlock_wrlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a> *&nbsp;</td>
          <td class="paramname"> <em>rwlock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></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. </p>
<dl><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>
  </dd>
</dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Feb 14 10:09:01 2012 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>