⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__apr__thread__mutex.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: Thread Mutex Routines</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Thread Mutex Routines</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td></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="group__apr__thread__mutex.html#ga7">APR_THREAD_MUTEX_DEFAULT</a>&nbsp;&nbsp;&nbsp;0x0   /**&lt; platform-optimal lock behavior */</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga8">APR_THREAD_MUTEX_NESTED</a>&nbsp;&nbsp;&nbsp;0x1   /**&lt; enable nested (recursive) locks */</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga9">APR_THREAD_MUTEX_UNNESTED</a>&nbsp;&nbsp;&nbsp;0x2   /**&lt; disable nested locks */</td></tr>

<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a></td></tr>

<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga1">apr_thread_mutex_create</a> (<a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> **mutex, unsigned int flags, <a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga2">apr_thread_mutex_lock</a> (<a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *mutex)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga3">apr_thread_mutex_trylock</a> (<a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *mutex)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga4">apr_thread_mutex_unlock</a> (<a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *mutex)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga5">apr_thread_mutex_destroy</a> (<a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *mutex)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__thread__mutex.html#ga6">apr_thread_mutex_pool_get</a> (const <a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *thethread_mutex)</td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga7" doxytag="apr_thread_mutex.h::APR_THREAD_MUTEX_DEFAULT" ></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"> #define APR_THREAD_MUTEX_DEFAULT&nbsp;&nbsp;&nbsp;0x0   /**&lt; platform-optimal lock behavior */          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
platform-optimal lock behavior     </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="apr_thread_mutex.h::APR_THREAD_MUTEX_NESTED" ></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"> #define APR_THREAD_MUTEX_NESTED&nbsp;&nbsp;&nbsp;0x1   /**&lt; enable nested (recursive) locks */          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
enable nested (recursive) locks     </td>
  </tr>
</table>
<a class="anchor" name="ga9" doxytag="apr_thread_mutex.h::APR_THREAD_MUTEX_UNNESTED" ></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"> #define APR_THREAD_MUTEX_UNNESTED&nbsp;&nbsp;&nbsp;0x2   /**&lt; disable nested locks */          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
disable nested locks     </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="apr_thread_mutex.h::apr_thread_mutex_t" ></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"> typedef struct <a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> <a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Opaque thread-local mutex structure     </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga1" doxytag="apr_thread_mutex.h::apr_thread_mutex_create" ></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_mutex_create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>mutex</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pool</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create and initialize a mutex that can be used to synchronize threads. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>mutex</em>&nbsp;</td><td>the memory address where the newly created mutex will be stored. </td></tr>
    <tr><td></td><td valign=top><em>flags</em>&nbsp;</td><td>Or'ed value of: <pre>
           APR_THREAD_MUTEX_DEFAULT   platform-optimal lock behavior.
           APR_THREAD_MUTEX_NESTED    enable nested (recursive) locks.
           APR_THREAD_MUTEX_UNNESTED  disable nested locks (non-recursive).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -