Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 8304a303b9546a4919a1b507a88742d9 > files > 244

lib64apr-devel-1.5.2-2.1.mga6.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Apache Portable Runtime: Reader/Writer Lock Routines</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Apache Portable Runtime
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

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

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Reader/Writer Lock Routines<div class="ingroups"><a class="el" href="group___a_p_r.html">Apache Portability Runtime library</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaede9b908e3d9e6a8aed7bd10d0ae0498"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__rwlock.html#gaede9b908e3d9e6a8aed7bd10d0ae0498">apr_thread_rwlock_t</a></td></tr>
<tr class="separator:gaede9b908e3d9e6a8aed7bd10d0ae0498"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadae9c87ad957112406b48947cb1f0e93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:gadae9c87ad957112406b48947cb1f0e93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad44a106cd9a81eef362d31837ca7018f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:gad44a106cd9a81eef362d31837ca7018f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2bbbc137f5c610e31bf87fd0a60c428e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:ga2bbbc137f5c610e31bf87fd0a60c428e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91543c9f97a6a1265524a5a8f55fef31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:ga91543c9f97a6a1265524a5a8f55fef31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga54c04596f8a1f44630bdda5a25578d63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:ga54c04596f8a1f44630bdda5a25578d63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7b31112d972abfcac30252e622eb040"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:gac7b31112d972abfcac30252e622eb040"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga136118166f50091fb30011d837a4cdcc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&#160;</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 class="separator:ga136118166f50091fb30011d837a4cdcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e78c5d8f2e7f4cdad46e912e68edd33"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *&#160;</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>
<tr class="separator:ga3e78c5d8f2e7f4cdad46e912e68edd33"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gaede9b908e3d9e6a8aed7bd10d0ae0498"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaede9b908e3d9e6a8aed7bd10d0ae0498">&#9670;&nbsp;</a></span>apr_thread_rwlock_t</h2>

<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>
<h2 class="groupheader">Function Documentation</h2>
<a id="gadae9c87ad957112406b48947cb1f0e93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadae9c87ad957112406b48947cb1f0e93">&#9670;&nbsp;</a></span>apr_thread_rwlock_create()</h2>

<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> **&#160;</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> *&#160;</td>
          <td class="paramname"><em>pool</em>&#160;</td>
        </tr>
        <tr>
          <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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the memory address where the newly created readwrite lock will be stored. </td></tr>
    <tr><td class="paramname">pool</td><td>the pool from which to allocate the mutex. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga136118166f50091fb30011d837a4cdcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga136118166f50091fb30011d837a4cdcc">&#9670;&nbsp;</a></span>apr_thread_rwlock_destroy()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy the read-write lock and free the associated memory. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the rwlock to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3e78c5d8f2e7f4cdad46e912e68edd33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e78c5d8f2e7f4cdad46e912e68edd33">&#9670;&nbsp;</a></span>apr_thread_rwlock_pool_get()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>thethread_rwlock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the pool used by this thread_rwlock. </p><dl class="section return"><dt>Returns</dt><dd>apr_pool_t the pool </dd></dl>

</div>
</div>
<a id="gad44a106cd9a81eef362d31837ca7018f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad44a106cd9a81eef362d31837ca7018f">&#9670;&nbsp;</a></span>apr_thread_rwlock_rdlock()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the read-write lock on which to acquire the shared read. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga2bbbc137f5c610e31bf87fd0a60c428e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2bbbc137f5c610e31bf87fd0a60c428e">&#9670;&nbsp;</a></span>apr_thread_rwlock_tryrdlock()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the rwlock on which to attempt the shared read. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga54c04596f8a1f44630bdda5a25578d63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga54c04596f8a1f44630bdda5a25578d63">&#9670;&nbsp;</a></span>apr_thread_rwlock_trywrlock()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the rwlock on which to attempt the exclusive write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac7b31112d972abfcac30252e622eb040"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac7b31112d972abfcac30252e622eb040">&#9670;&nbsp;</a></span>apr_thread_rwlock_unlock()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the read-write lock to be released (unlocked). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga91543c9f97a6a1265524a5a8f55fef31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga91543c9f97a6a1265524a5a8f55fef31">&#9670;&nbsp;</a></span>apr_thread_rwlock_wrlock()</h2>

<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> *&#160;</td>
          <td class="paramname"><em>rwlock</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rwlock</td><td>the read-write lock on which to acquire the exclusive write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>