<!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 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 Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related 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 "apr_proc_mutex.h"</code><br> <code>#include "apr_thread_mutex.h"</code><br> <code>#include "apr_thread_rwlock.h"</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 </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 </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 </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 </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 </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 </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <b>Value:</b><div class="fragment"><pre class="fragment">(((lck)->type == apr_anylock_none) \ ? APR_SUCCESS \ : (((lck)->type == apr_anylock_threadmutex) \ ? apr_thread_mutex_lock((lck)->lock.tm) \ : (((lck)->type == apr_anylock_procmutex) \ ? apr_proc_mutex_lock((lck)->lock.pm) \ : (((lck)->type == apr_anylock_readlock) \ ? apr_thread_rwlock_rdlock((lck)->lock.rw) \ : (((lck)->type == apr_anylock_writelock) \ ? apr_thread_rwlock_wrlock((lck)->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 </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <b>Value:</b><div class="fragment"><pre class="fragment">(((lck)->type == apr_anylock_none) \ ? APR_SUCCESS \ : (((lck)->type == apr_anylock_threadmutex) \ ? apr_thread_mutex_trylock((lck)->lock.tm) \ : (((lck)->type == apr_anylock_procmutex) \ ? apr_proc_mutex_trylock((lck)->lock.pm) \ : (((lck)->type == apr_anylock_readlock) \ ? apr_thread_rwlock_tryrdlock((lck)->lock.rw) \ : (((lck)->type == apr_anylock_writelock) \ ? apr_thread_rwlock_trywrlock((lck)->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 </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <b>Value:</b><div class="fragment"><pre class="fragment">(((lck)->type == apr_anylock_none) \ ? APR_SUCCESS \ : (((lck)->type == apr_anylock_threadmutex) \ ? apr_thread_mutex_unlock((lck)->lock.tm) \ : (((lck)->type == apr_anylock_procmutex) \ ? apr_proc_mutex_unlock((lck)->lock.pm) \ : ((((lck)->type == apr_anylock_readlock) || \ ((lck)->type == apr_anylock_writelock)) \ ? apr_thread_rwlock_unlock((lck)->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 <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>