This file is indexed.

/usr/share/doc/libucommon-dev/a00115.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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!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::rwlock 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&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;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&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00115.html">rwlock</a>
  </div>
</div>
<div class="contents">
<h1>ucc::rwlock Class Reference</h1><!-- doxytag: class="ucc::rwlock" --><!-- doxytag: inherits="ucc::ConditionalAccess,ucc::Exclusive,ucc::Shared" -->
<p>A generic and portable implimentation of Read/Write locking.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00208_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucc::rwlock:</div>
<div class="dynsection">
<div class="center"><img src="a00493.png" border="0" usemap="#ucc_1_1rwlock_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1rwlock_inherit__map" id="ucc_1_1rwlock_inherit__map">
<area shape="rect" id="node2" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks." alt="" coords="5,83,173,112"/><area shape="rect" id="node4" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="28,5,151,35"/><area shape="rect" id="node6" href="a00052.html" title="An exclusive locking protocol interface base." alt="" coords="197,83,307,112"/><area shape="rect" id="node8" href="a00135.html" title="An exclusive locking protocol interface base." alt="" coords="331,83,429,112"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucc::rwlock:</div>
<div class="dynsection">
<div class="center"><img src="a00494.png" border="0" usemap="#ucc_1_1rwlock_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1rwlock_coll__map" id="ucc_1_1rwlock_coll__map">
<area shape="rect" id="node2" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks." alt="" coords="5,83,173,112"/><area shape="rect" id="node4" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="28,5,151,35"/><area shape="rect" id="node6" href="a00052.html" title="An exclusive locking protocol interface base." alt="" coords="197,83,307,112"/><area shape="rect" id="node8" href="a00135.html" title="An exclusive locking protocol interface base." alt="" coords="331,83,429,112"/></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>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html">gaurd_reader</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gaurd class to apply scope based access locking to objects.  <a href="a00116.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html">gaurd_writer</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gaurd class to apply scope based exclusive locking to objects.  <a href="a00117.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a7960c0e198223a7c613bbdc5cbd4805f">access</a> (<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request shared (read) access through the lock.  <a href="#a7960c0e198223a7c613bbdc5cbd4805f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#aab9f9d9e5c0a5facfe64387c524b5ff9">getAccess</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads in shared access mode.  <a href="#aab9f9d9e5c0a5facfe64387c524b5ff9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#ab73a603e203de8d0399d7dbada45b8cd">getModify</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads waiting to modify the lock.  <a href="#ab73a603e203de8d0399d7dbada45b8cd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#ae3add208e88b26f9bc5f44684d3d8145">getWaiting</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of threads waiting to access after writer completes.  <a href="#ae3add208e88b26f9bc5f44684d3d8145"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#aa2c85cefd6ae9b8a3fbc97b74d78f4e4">modify</a> (<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request modify (write) access through the lock.  <a href="#aa2c85cefd6ae9b8a3fbc97b74d78f4e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a673108249e3f946205d9d2c1245d4854"></a><!-- doxytag: member="ucc::rwlock::release" ref="a673108249e3f946205d9d2c1245d4854" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a673108249e3f946205d9d2c1245d4854">release</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the lock. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a9a42acd0f99d25f166f7709c537e68"></a><!-- doxytag: member="ucc::rwlock::rwlock" ref="a7a9a42acd0f99d25f166f7709c537e68" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a7a9a42acd0f99d25f166f7709c537e68">rwlock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an instance of a rwlock. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#af4a6c027c5600c27902d3b7df3190e93">access</a> (<a class="el" href="a00115.html">rwlock</a> &amp;lock, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to access (read lock) a rwlock.  <a href="#af4a6c027c5600c27902d3b7df3190e93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a6e930890f976da6d645faabc95fb50d7">indexing</a> (unsigned size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify hash table size for gaurd protection.  <a href="#a6e930890f976da6d645faabc95fb50d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a889b828220b332d5d0610353d6a7cae4">modify</a> (<a class="el" href="a00115.html">rwlock</a> &amp;lock, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to modify (write lock) a rwlock.  <a href="#a889b828220b332d5d0610353d6a7cae4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#ac7850950cc55f1bdfb8d57c59cb05b28">reader</a> (void *object, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="a00135.html" title="An exclusive locking protocol interface base.">Shared</a> access to an arbitrary object.  <a href="#ac7850950cc55f1bdfb8d57c59cb05b28"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a6cfecdaad1e532905a310acda35cc287">release</a> (<a class="el" href="a00115.html">rwlock</a> &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a rwlock.  <a href="#a6cfecdaad1e532905a310acda35cc287"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a58854ccc82cc34c0203a722fb7212a02">release</a> (void *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release an arbitrary object that has been protected by a rwlock.  <a href="#a58854ccc82cc34c0203a722fb7212a02"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a845d6a826a49abdc22486f70ee3264ad">writer</a> (void *object, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write protect access to an arbitrary object.  <a href="#a845d6a826a49abdc22486f70ee3264ad"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A generic and portable implimentation of Read/Write locking. </p>
<p>This class impliments classical read/write locking, including "timed" locks. Support for scheduling threads to avoid writer starvation is also provided for. By building read/write locks from a conditional, we make them available on pthread implimetations and other platforms which do not normally include optional pthread rwlock's. We also do not restrict the number of threads that may use the lock. Finally, both the exclusive and shared protocols are implimented to support <a class="el" href="a00053.html" title="A kind of smart pointer object to support exclusive locking protocol.">exclusive_lock</a> and <a class="el" href="a00137.html" title="A kind of smart pointer object to support shared locking protocol.">shared_lock</a> referencing. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00208_source.html#l00533">533</a> of file <a class="el" href="a00208_source.html">thread.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af4a6c027c5600c27902d3b7df3190e93"></a><!-- doxytag: member="ucc::rwlock::access" ref="af4a6c027c5600c27902d3b7df3190e93" args="(rwlock &amp;lock, timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucc::rwlock::access </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00115.html">rwlock</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>lock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td><td>&nbsp;</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 access (read lock) a rwlock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>to access. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false if timeout. </dd></dl>

<p>Definition at line <a class="el" href="a00208_source.html#l00735">735</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="a00115_af4a6c027c5600c27902d3b7df3190e93_cgraph.png" border="0" usemap="#a00115_af4a6c027c5600c27902d3b7df3190e93_cgraph_map" alt=""></div>
<map name="a00115_af4a6c027c5600c27902d3b7df3190e93_cgraph_map" id="a00115_af4a6c027c5600c27902d3b7df3190e93_cgraph">
<area shape="rect" id="node3" href="a00115.html#a7960c0e198223a7c613bbdc5cbd4805f" title="Request shared (read) access through the lock." alt="" coords="199,5,340,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a7960c0e198223a7c613bbdc5cbd4805f"></a><!-- doxytag: member="ucc::rwlock::access" ref="a7960c0e198223a7c613bbdc5cbd4805f" args="(timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucc::rwlock::access </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Request shared (read) access through the lock. </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>&nbsp;</td><td>in milliseconds to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if locked, false if timeout. </dd></dl>

</div>
</div>
<a class="anchor" id="aab9f9d9e5c0a5facfe64387c524b5ff9"></a><!-- doxytag: member="ucc::rwlock::getAccess" ref="aab9f9d9e5c0a5facfe64387c524b5ff9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned ucc::rwlock::getAccess </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of threads in shared access mode. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of accessing threads. </dd></dl>

</div>
</div>
<a class="anchor" id="ab73a603e203de8d0399d7dbada45b8cd"></a><!-- doxytag: member="ucc::rwlock::getModify" ref="ab73a603e203de8d0399d7dbada45b8cd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned ucc::rwlock::getModify </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of threads waiting to modify the lock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of pending write threads. </dd></dl>

</div>
</div>
<a class="anchor" id="ae3add208e88b26f9bc5f44684d3d8145"></a><!-- doxytag: member="ucc::rwlock::getWaiting" ref="ae3add208e88b26f9bc5f44684d3d8145" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned ucc::rwlock::getWaiting </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of threads waiting to access after writer completes. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of waiting access threads. </dd></dl>

</div>
</div>
<a class="anchor" id="a6e930890f976da6d645faabc95fb50d7"></a><!-- doxytag: member="ucc::rwlock::indexing" ref="a6e930890f976da6d645faabc95fb50d7" args="(unsigned size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucc::rwlock::indexing </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>size</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Specify hash table size for gaurd protection. </p>
<p>The default is 1. This should be called at initialization time from the main thread of the application before any other threads are created. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of hash table used for gaurding. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a889b828220b332d5d0610353d6a7cae4"></a><!-- doxytag: member="ucc::rwlock::modify" ref="a889b828220b332d5d0610353d6a7cae4" args="(rwlock &amp;lock, timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucc::rwlock::modify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00115.html">rwlock</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>lock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td><td>&nbsp;</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 modify (write lock) a rwlock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>to modify. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false if timeout. </dd></dl>

<p>Definition at line <a class="el" href="a00208_source.html#l00726">726</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="a00115_a889b828220b332d5d0610353d6a7cae4_cgraph.png" border="0" usemap="#a00115_a889b828220b332d5d0610353d6a7cae4_cgraph_map" alt=""></div>
<map name="a00115_a889b828220b332d5d0610353d6a7cae4_cgraph_map" id="a00115_a889b828220b332d5d0610353d6a7cae4_cgraph">
<area shape="rect" id="node3" href="a00115.html#aa2c85cefd6ae9b8a3fbc97b74d78f4e4" title="Request modify (write) access through the lock." alt="" coords="199,5,340,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa2c85cefd6ae9b8a3fbc97b74d78f4e4"></a><!-- doxytag: member="ucc::rwlock::modify" ref="aa2c85cefd6ae9b8a3fbc97b74d78f4e4" args="(timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucc::rwlock::modify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Request modify (write) access through the lock. </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>&nbsp;</td><td>in milliseconds to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if locked, false if timeout. </dd></dl>

</div>
</div>
<a class="anchor" id="ac7850950cc55f1bdfb8d57c59cb05b28"></a><!-- doxytag: member="ucc::rwlock::reader" ref="ac7850950cc55f1bdfb8d57c59cb05b28" args="(void *object, timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucc::rwlock::reader </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="a00135.html" title="An exclusive locking protocol interface base.">Shared</a> access to an arbitrary object. </p>
<p>This is based on the protect function of mutex. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to share. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>in milliseconds to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if shared, false if timeout. </dd></dl>

</div>
</div>
<a class="anchor" id="a6cfecdaad1e532905a310acda35cc287"></a><!-- doxytag: member="ucc::rwlock::release" ref="a6cfecdaad1e532905a310acda35cc287" args="(rwlock &amp;lock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucc::rwlock::release </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00115.html">rwlock</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>lock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function to release a rwlock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>to release. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00208_source.html#l00742">742</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="a00115_a6cfecdaad1e532905a310acda35cc287_cgraph.png" border="0" usemap="#a00115_a6cfecdaad1e532905a310acda35cc287_cgraph_map" alt=""></div>
<map name="a00115_a6cfecdaad1e532905a310acda35cc287_cgraph_map" id="a00115_a6cfecdaad1e532905a310acda35cc287_cgraph">
<area shape="rect" id="node3" href="a00115.html#a58854ccc82cc34c0203a722fb7212a02" title="Release an arbitrary object that has been protected by a rwlock." alt="" coords="200,5,347,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a58854ccc82cc34c0203a722fb7212a02"></a><!-- doxytag: member="ucc::rwlock::release" ref="a58854ccc82cc34c0203a722fb7212a02" args="(void *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ucc::rwlock::release </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Release an arbitrary object that has been protected by a rwlock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to release. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a845d6a826a49abdc22486f70ee3264ad"></a><!-- doxytag: member="ucc::rwlock::writer" ref="a845d6a826a49abdc22486f70ee3264ad" args="(void *object, timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ucc::rwlock::writer </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write protect access to an arbitrary object. </p>
<p>This is like the protect function of mutex. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>to protect. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>in milliseconds to wait for lock. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if locked, false if timeout. </dd></dl>

</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:41 2010 for UCommon 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>