Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > bdcd72668be70f58bf0aa7c2102b0734 > files > 47

lib64apr-util-devel-1.2.12-4mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Apache Portable Runtime Utility Library: include/apr_anylock.h File Reference</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.5.4 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>include/apr_anylock.h File Reference</h1>APR-Util transparent any lock flavor wrapper. <a href="#_details">More...</a>
<p>
<code>#include &quot;apr_proc_mutex.h&quot;</code><br>
<code>#include &quot;apr_thread_mutex.h&quot;</code><br>
<code>#include &quot;apr_thread_rwlock.h&quot;</code><br>

<p>
<a href="apr__anylock_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__anylock__t.html">apr_anylock_t</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">union &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="unionapr__anylock__t_1_1apr__anylock__u__t.html">apr_anylock_t::apr_anylock_u_t</a></td></tr>

<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="apr__anylock_8h.html#c43b130fb19a434647c34e1d7040fc49">APR_ANYLOCK_LOCK</a>(lck)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="apr__anylock_8h.html#fbc6bc9b6cabe0db55e8896fc26053f4">APR_ANYLOCK_TRYLOCK</a>(lck)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="apr__anylock_8h.html#367f0d4cc5239e95ee925542d4a0b3fb">APR_ANYLOCK_UNLOCK</a>(lck)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
APR-Util transparent any lock flavor wrapper. 
<p>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="c43b130fb19a434647c34e1d7040fc49"></a><!-- doxytag: member="apr_anylock.h::APR_ANYLOCK_LOCK" ref="c43b130fb19a434647c34e1d7040fc49" args="(lck)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APR_ANYLOCK_LOCK          </td>
          <td>(</td>
          <td class="paramtype">lck&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">(((lck)-&gt;type == apr_anylock_none)         \
      ? APR_SUCCESS                              \
      : (((lck)-&gt;type == apr_anylock_threadmutex)  \
          ? apr_thread_mutex_lock((lck)-&gt;lock.tm)    \
          : (((lck)-&gt;type == apr_anylock_procmutex)    \
              ? apr_proc_mutex_lock((lck)-&gt;lock.pm)      \
              : (((lck)-&gt;type == apr_anylock_readlock)     \
                  ? apr_thread_rwlock_rdlock((lck)-&gt;lock.rw) \
                  : (((lck)-&gt;type == apr_anylock_writelock)    \
                      ? apr_thread_rwlock_wrlock((lck)-&gt;lock.rw) \
                      : APR_EINVAL)))))
</pre></div>Lock an <a class="el" href="structapr__anylock__t.html">apr_anylock_t</a> structure 
</div>
</div><p>
<a class="anchor" name="fbc6bc9b6cabe0db55e8896fc26053f4"></a><!-- doxytag: member="apr_anylock.h::APR_ANYLOCK_TRYLOCK" ref="fbc6bc9b6cabe0db55e8896fc26053f4" args="(lck)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APR_ANYLOCK_TRYLOCK          </td>
          <td>(</td>
          <td class="paramtype">lck&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">(((lck)-&gt;type == apr_anylock_none)            \
      ? APR_SUCCESS                                 \
      : (((lck)-&gt;type == apr_anylock_threadmutex)     \
          ? apr_thread_mutex_trylock((lck)-&gt;lock.tm)    \
          : (((lck)-&gt;type == apr_anylock_procmutex)       \
              ? apr_proc_mutex_trylock((lck)-&gt;lock.pm)      \
              : (((lck)-&gt;type == apr_anylock_readlock)        \
                  ? apr_thread_rwlock_tryrdlock((lck)-&gt;lock.rw) \
                  : (((lck)-&gt;type == apr_anylock_writelock)       \
                      ? apr_thread_rwlock_trywrlock((lck)-&gt;lock.rw) \
                          : APR_EINVAL)))))
</pre></div>Try to lock an <a class="el" href="structapr__anylock__t.html">apr_anylock_t</a> structure 
</div>
</div><p>
<a class="anchor" name="367f0d4cc5239e95ee925542d4a0b3fb"></a><!-- doxytag: member="apr_anylock.h::APR_ANYLOCK_UNLOCK" ref="367f0d4cc5239e95ee925542d4a0b3fb" args="(lck)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APR_ANYLOCK_UNLOCK          </td>
          <td>(</td>
          <td class="paramtype">lck&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">(((lck)-&gt;type == apr_anylock_none)         \
      ? APR_SUCCESS                              \
      : (((lck)-&gt;type == apr_anylock_threadmutex)  \
          ? apr_thread_mutex_unlock((lck)-&gt;lock.tm)  \
          : (((lck)-&gt;type == apr_anylock_procmutex)    \
              ? apr_proc_mutex_unlock((lck)-&gt;lock.pm)    \
              : ((((lck)-&gt;type == apr_anylock_readlock) || \
                  ((lck)-&gt;type == apr_anylock_writelock))    \
                  ? apr_thread_rwlock_unlock((lck)-&gt;lock.rw)   \
                      : APR_EINVAL))))
</pre></div>Unlock an <a class="el" href="structapr__anylock__t.html">apr_anylock_t</a> structure 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 24 02:22:55 2008 for Apache Portable Runtime Utility Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>