/usr/share/doc/libucommon-dev/a00032.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | <!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>UCommon: ucc::barrier Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00032.html">barrier</a>
</div>
</div>
<div class="contents">
<h1>ucc::barrier Class Reference</h1><!-- doxytag: class="ucc::barrier" --><!-- doxytag: inherits="ucc::Conditional" -->
<p>A portable implimentation of "barrier" thread sychronization.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00208_source.html">thread.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::barrier:</div>
<div class="dynsection">
<div class="center"><img src="a00363.png" border="0" usemap="#ucc_1_1barrier_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1barrier_inherit__map" id="ucc_1_1barrier_inherit__map">
<area shape="rect" id="node2" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,5,128,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucc::barrier:</div>
<div class="dynsection">
<div class="center"><img src="a00364.png" border="0" usemap="#ucc_1_1barrier_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1barrier_coll__map" id="ucc_1_1barrier_coll__map">
<area shape="rect" id="node2" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,5,128,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#a345ab1b74eca9d58abf4487e8b78021e">barrier</a> (unsigned count)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a barrier with an initial size. <a href="#a345ab1b74eca9d58abf4487e8b78021e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ae377e729f2505627e7ecb4ee342ffb86">set</a> (unsigned count)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dynamically alter the number of threads required. <a href="#ae377e729f2505627e7ecb4ee342ffb86"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#afa3a86dd56317a9f602fa62f15fbf958">wait</a> (<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait at the barrier until either the count of threads waiting is reached or a timeout has occurred. <a href="#afa3a86dd56317a9f602fa62f15fbf958"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e861c5a19bd462e79cc1edac835506c"></a><!-- doxytag: member="ucc::barrier::wait" ref="a0e861c5a19bd462e79cc1edac835506c" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c">wait</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait at the barrier until the count of threads waiting is reached. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a210eba15b848ea962f9934530da51fd3"></a><!-- doxytag: member="ucc::barrier::~barrier" ref="a210eba15b848ea962f9934530da51fd3" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#a210eba15b848ea962f9934530da51fd3">~barrier</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy barrier and release pending threads. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#a66f3d5eb7ee03c10d0be9a675c7c4fcf">set</a> (<a class="el" href="a00032.html">barrier</a> &sync, unsigned count)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience function to set a barrier count. <a href="#a66f3d5eb7ee03c10d0be9a675c7c4fcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#a294528866e7d6587a01d008aa8bb9e73">wait</a> (<a class="el" href="a00032.html">barrier</a> &sync, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience function to wait at a barrier with a timeout. <a href="#a294528866e7d6587a01d008aa8bb9e73"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ab4e354bdd4b7d22bc1a5fb7fdd3210e1">wait</a> (<a class="el" href="a00032.html">barrier</a> &sync)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience function to wait at a barrier. <a href="#ab4e354bdd4b7d22bc1a5fb7fdd3210e1"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A portable implimentation of "barrier" thread sychronization. </p>
<p>A barrier waits until a specified number of threads have all reached the barrier, and then releases all the threads together. This implimentation works regardless of whether the thread library supports barriers since it is built from conditional. It also differs in that the number of threads required can be changed dynamically at runtime, unlike pthread barriers which, when supported, have a fixed limit defined at creation time. Since we use conditionals, another feature we can add is optional support for a wait with timeout. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00208_source.html#l00919">919</a> of file <a class="el" href="a00208_source.html">thread.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a345ab1b74eca9d58abf4487e8b78021e"></a><!-- doxytag: member="ucc::barrier::barrier" ref="a345ab1b74eca9d58abf4487e8b78021e" args="(unsigned count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::barrier::barrier </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>count</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Construct a barrier with an initial size. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>of threads required. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a66f3d5eb7ee03c10d0be9a675c7c4fcf"></a><!-- doxytag: member="ucc::barrier::set" ref="a66f3d5eb7ee03c10d0be9a675c7c4fcf" args="(barrier &sync, unsigned count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void ucc::barrier::set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00032.html">barrier</a> & </td>
<td class="paramname"> <em>sync</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>count</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenience function to set a barrier count. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>sync</em> </td><td>object to set. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>of threads to set. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00208_source.html#l00979">979</a> of file <a class="el" href="a00208_source.html">thread.h</a>.</p>
</div>
</div>
<a class="anchor" id="ae377e729f2505627e7ecb4ee342ffb86"></a><!-- doxytag: member="ucc::barrier::set" ref="ae377e729f2505627e7ecb4ee342ffb86" args="(unsigned count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::barrier::set </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>count</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Dynamically alter the number of threads required. </p>
<p>If the size is set below the currently waiting threads, then the barrier releases. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>of threads required. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a294528866e7d6587a01d008aa8bb9e73"></a><!-- doxytag: member="ucc::barrier::wait" ref="a294528866e7d6587a01d008aa8bb9e73" args="(barrier &sync, timeout_t timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool ucc::barrier::wait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00032.html">barrier</a> & </td>
<td class="paramname"> <em>sync</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> </td>
<td class="paramname"> <em>timeout</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenience function to wait at a barrier with a timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>sync</em> </td><td>object to wait at. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>to wait in milliseconds. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if timer expired. </dd></dl>
<p>Definition at line <a class="el" href="a00208_source.html#l00970">970</a> of file <a class="el" href="a00208_source.html">thread.h</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00032_a294528866e7d6587a01d008aa8bb9e73_cgraph.png" border="0" usemap="#a00032_a294528866e7d6587a01d008aa8bb9e73_cgraph_map" alt=""></div>
<map name="a00032_a294528866e7d6587a01d008aa8bb9e73_cgraph_map" id="a00032_a294528866e7d6587a01d008aa8bb9e73_cgraph">
<area shape="rect" id="node3" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c" title="Wait at the barrier until the count of threads waiting is reached." alt="" coords="183,5,308,35"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ab4e354bdd4b7d22bc1a5fb7fdd3210e1"></a><!-- doxytag: member="ucc::barrier::wait" ref="ab4e354bdd4b7d22bc1a5fb7fdd3210e1" args="(barrier &sync)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void ucc::barrier::wait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00032.html">barrier</a> & </td>
<td class="paramname"> <em>sync</em></td>
<td> ) </td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenience function to wait at a barrier. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>sync</em> </td><td>object to wait at. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00208_source.html#l00961">961</a> of file <a class="el" href="a00208_source.html">thread.h</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00032_ab4e354bdd4b7d22bc1a5fb7fdd3210e1_cgraph.png" border="0" usemap="#a00032_ab4e354bdd4b7d22bc1a5fb7fdd3210e1_cgraph_map" alt=""></div>
<map name="a00032_ab4e354bdd4b7d22bc1a5fb7fdd3210e1_cgraph_map" id="a00032_ab4e354bdd4b7d22bc1a5fb7fdd3210e1_cgraph">
<area shape="rect" id="node3" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c" title="Wait at the barrier until the count of threads waiting is reached." alt="" coords="183,5,308,35"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="afa3a86dd56317a9f602fa62f15fbf958"></a><!-- doxytag: member="ucc::barrier::wait" ref="afa3a86dd56317a9f602fa62f15fbf958" args="(timeout_t timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::barrier::wait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> </td>
<td class="paramname"> <em>timeout</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wait at the barrier until either the count of threads waiting is reached or a timeout has occurred. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>to wait in milliseconds. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if barrier reached, false if timer expired. </dd></dl>
<p>Reimplemented from <a class="el" href="a00040.html#a3f860e115dfe20ff91c89eaa0db4115d">ucc::Conditional</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00208_source.html">thread.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:26 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|