D7net Mini Sh3LL v1
Current File : /var/www/html/hpsc/staff/../../../../../lib/os-probes/../../share/doc/whiptail/../libxml2/../binutils/../libapr1-dev/html/group__apr__thread__cond.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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 id="projectalign" 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.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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> |
<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">
<div class="dynheader">
Collaboration diagram for Condition Variable Routines:</div>
<div class="dyncontent">
<div class="center"><img src="group__apr__thread__cond.png" border="0" usemap="#group____apr____thread____cond" alt=""/></div>
<!-- MAP 0 -->
</div>
<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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> * </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"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gae8f918d38bf1c58bc09670eee456ae5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8f918d38bf1c58bc09670eee456ae5e">◆ </a></span>apr_thread_cond_t</h2>
<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 id="gafbbedd2a07629fe3186343035ae83152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafbbedd2a07629fe3186343035ae83152">◆ </a></span>apr_thread_cond_broadcast()</h2>
<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> * </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 id="gab39e8b722d46d23466e9e346ada85a7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab39e8b722d46d23466e9e346ada85a7f">◆ </a></span>apr_thread_cond_create()</h2>
<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> ** </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> * </td>
<td class="paramname"><em>pool</em> </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 id="ga049e646e23c670f3a79fe25401b9c1b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga049e646e23c670f3a79fe25401b9c1b0">◆ </a></span>apr_thread_cond_destroy()</h2>
<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> * </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 id="gafc2d7f2907eb12e5543c971a4c0140ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc2d7f2907eb12e5543c971a4c0140ee">◆ </a></span>apr_thread_cond_pool_get()</h2>
<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> * </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 id="gadf7ad6c2731bc6128f969d3efc7ff5eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf7ad6c2731bc6128f969d3efc7ff5eb">◆ </a></span>apr_thread_cond_signal()</h2>
<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> * </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 id="ga67f2feecb7fa1929cc9b354dafd00306"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga67f2feecb7fa1929cc9b354dafd00306">◆ </a></span>apr_thread_cond_timedwait()</h2>
<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> * </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> * </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> </td>
<td class="paramname"><em>timeout</em> </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 id="ga789719a5f02bdab8b8abbc8bddd0406b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga789719a5f02bdab8b8abbc8bddd0406b">◆ </a></span>apr_thread_cond_wait()</h2>
<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> * </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> * </td>
<td class="paramname"><em>mutex</em> </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 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
AnonSec - 2021 | Recode By D7net