Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 57c367c233a564c968ad389089aceff6 > files > 252

lib64apr-devel-1.5.0-1.mga4.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.5"/>
<title>Apache Portable Runtime: Condition Variable 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/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</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 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.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></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">Condition Variable 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:gae8f918d38bf1c58bc09670eee456ae5e"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a></td></tr>
<tr class="separator:gae8f918d38bf1c58bc09670eee456ae5e"><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:gab39e8b722d46d23466e9e346ada85a7f"><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__cond.html#gab39e8b722d46d23466e9e346ada85a7f">apr_thread_cond_create</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> **cond, <a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool)</td></tr>
<tr class="separator:gab39e8b722d46d23466e9e346ada85a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga789719a5f02bdab8b8abbc8bddd0406b"><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__cond.html#ga789719a5f02bdab8b8abbc8bddd0406b">apr_thread_cond_wait</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *cond, <a class="el" href="group__apr__thread__mutex.html#ga95712060ba3a192036416e1ccef1db75">apr_thread_mutex_t</a> *mutex)</td></tr>
<tr class="separator:ga789719a5f02bdab8b8abbc8bddd0406b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga67f2feecb7fa1929cc9b354dafd00306"><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__cond.html#ga67f2feecb7fa1929cc9b354dafd00306">apr_thread_cond_timedwait</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *cond, <a class="el" href="group__apr__thread__mutex.html#ga95712060ba3a192036416e1ccef1db75">apr_thread_mutex_t</a> *mutex, <a class="el" href="group__apr__time.html#gaae2129185a395cc393f76fabf4f43e47">apr_interval_time_t</a> timeout)</td></tr>
<tr class="separator:ga67f2feecb7fa1929cc9b354dafd00306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf7ad6c2731bc6128f969d3efc7ff5eb"><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__cond.html#gadf7ad6c2731bc6128f969d3efc7ff5eb">apr_thread_cond_signal</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *cond)</td></tr>
<tr class="separator:gadf7ad6c2731bc6128f969d3efc7ff5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafbbedd2a07629fe3186343035ae83152"><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__cond.html#gafbbedd2a07629fe3186343035ae83152">apr_thread_cond_broadcast</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *cond)</td></tr>
<tr class="separator:gafbbedd2a07629fe3186343035ae83152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga049e646e23c670f3a79fe25401b9c1b0"><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__cond.html#ga049e646e23c670f3a79fe25401b9c1b0">apr_thread_cond_destroy</a> (<a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *cond)</td></tr>
<tr class="separator:ga049e646e23c670f3a79fe25401b9c1b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc2d7f2907eb12e5543c971a4c0140ee"><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__cond.html#gafc2d7f2907eb12e5543c971a4c0140ee">apr_thread_cond_pool_get</a> (const <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *thethread_cond)</td></tr>
<tr class="separator:gafc2d7f2907eb12e5543c971a4c0140ee"><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 class="anchor" id="gae8f918d38bf1c58bc09670eee456ae5e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Opaque structure for thread condition variables </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafbbedd2a07629fe3186343035ae83152"></a>
<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_cond_broadcast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Signals all threads blocking on the given condition variable. Each thread that was signaled is then scheduled to wake up and acquire the associated mutex. This will happen in a serialized manner. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the condition variable on which to produce the broadcast. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>If no threads are waiting on the condition variable, nothing happens. </dd></dl>

</div>
</div>
<a class="anchor" id="gab39e8b722d46d23466e9e346ada85a7f"></a>
<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_cond_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> **&#160;</td>
          <td class="paramname"><em>cond</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: destroying a condition variable (or likewise, destroying or clearing the pool from which a condition variable was allocated) if any threads are blocked waiting on it gives undefined results. Create and initialize a condition variable that can be used to signal and schedule threads in a single process. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the memory address where the newly created condition variable will be stored. </td></tr>
    <tr><td class="paramname">pool</td><td>the pool from which to allocate the condition. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga049e646e23c670f3a79fe25401b9c1b0"></a>
<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_cond_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy the condition variable and free the associated memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the condition variable to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafc2d7f2907eb12e5543c971a4c0140ee"></a>
<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_cond_pool_get </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>thethread_cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the pool used by this thread_cond. </p>
<dl class="section return"><dt>Returns</dt><dd>apr_pool_t the pool </dd></dl>

</div>
</div>
<a class="anchor" id="gadf7ad6c2731bc6128f969d3efc7ff5eb"></a>
<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_cond_signal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Signals a single thread, if one exists, that is blocking on the given condition variable. That thread is then scheduled to wake up and acquire the associated mutex. Although it is not required, if predictable scheduling is desired, that mutex must be locked while calling this function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the condition variable on which to produce the signal. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>If no threads are waiting on the condition variable, nothing happens. </dd></dl>

</div>
</div>
<a class="anchor" id="ga67f2feecb7fa1929cc9b354dafd00306"></a>
<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_cond_timedwait </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>cond</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__apr__thread__mutex.html#ga95712060ba3a192036416e1ccef1db75">apr_thread_mutex_t</a> *&#160;</td>
          <td class="paramname"><em>mutex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__apr__time.html#gaae2129185a395cc393f76fabf4f43e47">apr_interval_time_t</a>&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Put the active calling thread to sleep until signaled to wake up or the timeout is reached. Each condition variable must be associated with a mutex, and that mutex must be locked before calling this function, or the behavior will be undefined. As the calling thread is put to sleep, the given mutex will be simultaneously released; and as this thread wakes up the lock is again simultaneously acquired. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the condition variable on which to block. </td></tr>
    <tr><td class="paramname">mutex</td><td>the mutex that must be locked upon entering this function, is released while the thread is asleep, and is again acquired before returning from this function. </td></tr>
    <tr><td class="paramname">timeout</td><td>The amount of time in microseconds to wait. This is a maximum, not a minimum. If the condition is signaled, we will wake up before this time, otherwise the error APR_TIMEUP is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga789719a5f02bdab8b8abbc8bddd0406b"></a>
<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_cond_wait </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a> *&#160;</td>
          <td class="paramname"><em>cond</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__apr__thread__mutex.html#ga95712060ba3a192036416e1ccef1db75">apr_thread_mutex_t</a> *&#160;</td>
          <td class="paramname"><em>mutex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Put the active calling thread to sleep until signaled to wake up. Each condition variable must be associated with a mutex, and that mutex must be locked before calling this function, or the behavior will be undefined. As the calling thread is put to sleep, the given mutex will be simultaneously released; and as this thread wakes up the lock is again simultaneously acquired. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>the condition variable on which to block. </td></tr>
    <tr><td class="paramname">mutex</td><td>the mutex that must be locked upon entering this function, is released while the thread is asleep, and is again acquired before returning from this function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Spurious wakeups may occur. Before and after every call to wait on a condition variable, the caller should test whether the condition is already met. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Nov 30 2013 15:32:17 for Apache Portable Runtime by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>