Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > e0236b39c613e86bcee76bad717809a5 > files > 225

libapr-devel-1.4.6-0.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>Apache Portable Runtime: Condition Variable Routines</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.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)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Condition Variable Routines<br/>
<small>
[<a class="el" href="group___a_p_r.html">Apache Portability Runtime library</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__thread__cond.html#gae8f918d38bf1c58bc09670eee456ae5e">apr_thread_cond_t</a></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>&nbsp;</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><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *&nbsp;</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>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gae8f918d38bf1c58bc09670eee456ae5e"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_t" ref="gae8f918d38bf1c58bc09670eee456ae5e" args="" -->
<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>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafbbedd2a07629fe3186343035ae83152"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_broadcast" ref="gafbbedd2a07629fe3186343035ae83152" args="(apr_thread_cond_t *cond)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>cond</em></td>
          <td>&nbsp;)&nbsp;</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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the condition variable on which to produce the broadcast. </td></tr>
  </table>
  </dd>
</dl>
<dl class="remark"><dt><b>Remarks:</b></dt><dd>If no threads are waiting on the condition variable, nothing happens. </dd></dl>

</div>
</div>
<a class="anchor" id="gab39e8b722d46d23466e9e346ada85a7f"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_create" ref="gab39e8b722d46d23466e9e346ada85a7f" args="(apr_thread_cond_t **cond, apr_pool_t *pool)" -->
<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> **&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>pool</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the memory address where the newly created condition variable will be stored. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pool</em>&nbsp;</td><td>the pool from which to allocate the condition. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga049e646e23c670f3a79fe25401b9c1b0"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_destroy" ref="ga049e646e23c670f3a79fe25401b9c1b0" args="(apr_thread_cond_t *cond)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>cond</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destroy the condition variable and free the associated memory. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the condition variable to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafc2d7f2907eb12e5543c971a4c0140ee"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_pool_get" ref="gafc2d7f2907eb12e5543c971a4c0140ee" args="(const apr_thread_cond_t *thethread_cond)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>thethread_cond</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the pool used by this thread_cond. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>apr_pool_t the pool </dd></dl>

</div>
</div>
<a class="anchor" id="gadf7ad6c2731bc6128f969d3efc7ff5eb"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_signal" ref="gadf7ad6c2731bc6128f969d3efc7ff5eb" args="(apr_thread_cond_t *cond)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>cond</em></td>
          <td>&nbsp;)&nbsp;</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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the condition variable on which to produce the signal. </td></tr>
  </table>
  </dd>
</dl>
<dl class="remark"><dt><b>Remarks:</b></dt><dd>If no threads are waiting on the condition variable, nothing happens. </dd></dl>

</div>
</div>
<a class="anchor" id="ga67f2feecb7fa1929cc9b354dafd00306"></a><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_timedwait" ref="ga67f2feecb7fa1929cc9b354dafd00306" args="(apr_thread_cond_t *cond, apr_thread_mutex_t *mutex, apr_interval_time_t timeout)" -->
<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> *&nbsp;</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> *&nbsp;</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>&nbsp;</td>
          <td class="paramname"> <em>timeout</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the condition variable on which to block. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mutex</em>&nbsp;</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 valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</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><!-- doxytag: member="apr_thread_cond.h::apr_thread_cond_wait" ref="ga789719a5f02bdab8b8abbc8bddd0406b" args="(apr_thread_cond_t *cond, apr_thread_mutex_t *mutex)" -->
<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> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>mutex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>the condition variable on which to block. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mutex</em>&nbsp;</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="remark"><dt><b>Remarks:</b></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>
<!--- 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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Feb 14 10:09:01 2012 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>