📄 group__apr__thread__rwlock.html
字号:
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_thread_rwlock_rdlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__rwlock.html#ga0">apr_thread_rwlock_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>rwlock</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<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></td><td valign=top><em>rwlock</em> </td><td>the read-write lock on which to acquire the shared read. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="apr_thread_rwlock.h::apr_thread_rwlock_tryrdlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_thread_rwlock_tryrdlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__rwlock.html#ga0">apr_thread_rwlock_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>rwlock</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<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#ga2">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#ga44">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></td><td valign=top><em>rwlock</em> </td><td>the rwlock on which to attempt the shared read. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="apr_thread_rwlock.h::apr_thread_rwlock_trywrlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_thread_rwlock_trywrlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__rwlock.html#ga0">apr_thread_rwlock_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>rwlock</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<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#ga4">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#ga44">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></td><td valign=top><em>rwlock</em> </td><td>the rwlock on which to attempt the exclusive write. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="apr_thread_rwlock.h::apr_thread_rwlock_unlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_thread_rwlock_unlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__rwlock.html#ga0">apr_thread_rwlock_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>rwlock</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<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></td><td valign=top><em>rwlock</em> </td><td>the read-write lock to be released (unlocked). </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="apr_thread_rwlock.h::apr_thread_rwlock_wrlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_thread_rwlock_wrlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__rwlock.html#ga0">apr_thread_rwlock_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>rwlock</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<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></td><td valign=top><em>rwlock</em> </td><td>the read-write lock on which to acquire the exclusive write. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:26 2005 for Apache Portable Runtime by
<a href="../../../www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -