This file is indexed.

/usr/share/doc/libucommon-dev/a00208_source.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
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
<!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: ucommon/thread.h Source File</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><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><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="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>ucommon/thread.h</h1><a href="a00208.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This file is part of GNU uCommon C++.</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">// GNU uCommon C++ is free software: you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">// it under the terms of the GNU Lesser General Public License as published </span>
<a name="l00007"></a>00007 <span class="comment">// by the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">// (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// GNU uCommon C++ is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">// GNU Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00016"></a>00016 <span class="comment">// along with GNU uCommon C++.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00017"></a>00017 
<a name="l00053"></a>00053 <span class="preprocessor">#ifndef _UCOMMON_THREAD_H_</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define _UCOMMON_THREAD_H_</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#ifndef _UCOMMON_CONFIG_H_</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00201.html" title="Various miscelanous platform specific headers and defines.">ucommon/platform.h</a>&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#endif</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a>00060 <span class="preprocessor">#ifndef _UCOMMON_ACCESS_H_</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00185.html" title="Locking classes for member function automatic operations.">ucommon/access.h</a>&gt;</span>
<a name="l00062"></a>00062 <span class="preprocessor">#endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="preprocessor">#ifndef _UCOMMON_TIMERS_H_</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00209.html" title="Realtime timers and timer queues.">ucommon/timers.h</a>&gt;</span>
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span>
<a name="l00068"></a>00068 <span class="preprocessor">#ifndef _UCOMMON_MEMORY_H_</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00197.html" title="Private heaps, pools, and associations.">ucommon/memory.h</a>&gt;</span>
<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span>
<a name="l00072"></a>00072 NAMESPACE_UCOMMON
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 <span class="keyword">class </span>SharedPointer;
<a name="l00075"></a>00075 
<a name="l00086"></a><a class="code" href="a00040.html">00086</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a> 
<a name="l00087"></a>00087 {
<a name="l00088"></a>00088 <span class="keyword">private</span>:
<a name="l00089"></a>00089     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>;
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#ifdef  _MSWINDOWS_</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>    <span class="keyword">enum</span> {SIGNAL = 0, BROADCAST = 1};
<a name="l00093"></a>00093     HANDLE events[2];
<a name="l00094"></a>00094     <span class="keywordtype">unsigned</span> waiting;
<a name="l00095"></a>00095     CRITICAL_SECTION mlock;
<a name="l00096"></a>00096     CRITICAL_SECTION <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>;
<a name="l00097"></a>00097 <span class="preprocessor">#else</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#ifndef __PTH__</span>
<a name="l00099"></a>00099 <span class="preprocessor"></span>    <span class="keyword">class </span>__LOCAL attribute
<a name="l00100"></a>00100     {
<a name="l00101"></a>00101     <span class="keyword">public</span>:
<a name="l00102"></a>00102         pthread_condattr_t attr;
<a name="l00103"></a>00103         attribute();
<a name="l00104"></a>00104     };
<a name="l00105"></a>00105 
<a name="l00106"></a>00106     __LOCAL <span class="keyword">static</span> attribute attr;
<a name="l00107"></a>00107 <span class="preprocessor">#endif</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span>
<a name="l00109"></a>00109     pthread_cond_t cond;
<a name="l00110"></a>00110     pthread_mutex_t <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>;
<a name="l00111"></a>00111 <span class="preprocessor">#endif</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00113"></a>00113 <span class="keyword">protected</span>:
<a name="l00114"></a>00114     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>;
<a name="l00115"></a>00115 
<a name="l00121"></a>00121     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00122"></a>00122 
<a name="l00128"></a>00128     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<span class="keyword">struct</span> timespec *timeout);
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <span class="preprocessor">#ifdef  _MSWINDOWS_</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<span class="keywordtype">void</span>)
<a name="l00132"></a>00132         {EnterCriticalSection(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00133"></a>00133 
<a name="l00134"></a>00134     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a140946704e1b4c4e9c3b14081c1d300d" title="Convenience function to unlock an exclusive object through it&amp;#39;s protocol.">unlock</a>(<span class="keywordtype">void</span>)
<a name="l00135"></a>00135         {LeaveCriticalSection(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00136"></a>00136 
<a name="l00137"></a>00137     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<span class="keywordtype">void</span>);
<a name="l00138"></a>00138     <span class="keywordtype">void</span> signal(<span class="keywordtype">void</span>);
<a name="l00139"></a>00139     <span class="keywordtype">void</span> broadcast(<span class="keywordtype">void</span>);
<a name="l00140"></a>00140 
<a name="l00141"></a>00141 <span class="preprocessor">#else</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span>
<a name="l00145"></a><a class="code" href="a00040.html#a0c0de58a83ec8e45fc8c1fdff0fc488b">00145</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<span class="keywordtype">void</span>)
<a name="l00146"></a>00146         {pthread_mutex_lock(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00147"></a>00147 
<a name="l00151"></a><a class="code" href="a00040.html#a919ca7b3262f5da264d8398bae7e839a">00151</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a140946704e1b4c4e9c3b14081c1d300d" title="Convenience function to unlock an exclusive object through it&amp;#39;s protocol.">unlock</a>(<span class="keywordtype">void</span>)
<a name="l00152"></a>00152         {pthread_mutex_unlock(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00153"></a>00153 
<a name="l00157"></a><a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3">00157</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<span class="keywordtype">void</span>)
<a name="l00158"></a>00158         {pthread_cond_wait(&amp;cond, &amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00159"></a>00159 
<a name="l00163"></a><a class="code" href="a00040.html#acfa7200ea5fcd5ddaef196c5ab98d0be">00163</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> signal(<span class="keywordtype">void</span>)
<a name="l00164"></a>00164         {pthread_cond_signal(&amp;cond);};
<a name="l00165"></a>00165 
<a name="l00169"></a><a class="code" href="a00040.html#a24b66cad805b3c511d6208c25c740212">00169</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcast(<span class="keywordtype">void</span>)
<a name="l00170"></a>00170         {pthread_cond_broadcast(&amp;cond);};
<a name="l00171"></a>00171 <span class="preprocessor">#endif</span>
<a name="l00172"></a>00172 <span class="preprocessor"></span>
<a name="l00176"></a>00176     <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>();
<a name="l00177"></a>00177 
<a name="l00181"></a>00181     ~<a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>();
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="keyword">public</span>:
<a name="l00184"></a>00184 <span class="preprocessor">#if !defined(_MSWINDOWS_) &amp;&amp; !defined(__PTH__)</span>
<a name="l00185"></a>00185 <span class="preprocessor"></span>
<a name="l00190"></a><a class="code" href="a00040.html#a5428adf9d78903d78d4163d05aa93681">00190</a>     <span class="keyword">static</span> <span class="keyword">inline</span> pthread_condattr_t *initializer(<span class="keywordtype">void</span>)
<a name="l00191"></a>00191         {<span class="keywordflow">return</span> &amp;attr.attr;};
<a name="l00192"></a>00192 <span class="preprocessor">#endif</span>
<a name="l00193"></a>00193 <span class="preprocessor"></span>
<a name="l00200"></a>00200     <span class="keyword">static</span> <span class="keywordtype">void</span> gettimeout(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout, <span class="keyword">struct</span> timespec *hires);
<a name="l00201"></a>00201 };
<a name="l00202"></a>00202 
<a name="l00210"></a><a class="code" href="a00041.html">00210</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a> : <span class="keyword">private</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l00211"></a>00211 {
<a name="l00212"></a>00212 <span class="keyword">private</span>:
<a name="l00213"></a>00213 <span class="preprocessor">#ifndef _MSWINDOWS_</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span>    pthread_cond_t bcast;
<a name="l00215"></a>00215 <span class="preprocessor">#endif</span>
<a name="l00216"></a>00216 <span class="preprocessor"></span>
<a name="l00217"></a>00217 <span class="keyword">protected</span>:
<a name="l00218"></a>00218     <span class="keywordtype">unsigned</span> pending, waiting, sharing;
<a name="l00219"></a>00219 
<a name="l00225"></a>00225     <span class="keywordtype">bool</span> waitSignal(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00226"></a>00226 
<a name="l00232"></a>00232     <span class="keywordtype">bool</span> waitBroadcast(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00233"></a>00233 
<a name="l00234"></a>00234 
<a name="l00240"></a>00240     <span class="keywordtype">bool</span> waitSignal(<span class="keyword">struct</span> timespec *timeout);
<a name="l00241"></a>00241 
<a name="l00247"></a>00247     <span class="keywordtype">bool</span> waitBroadcast(<span class="keyword">struct</span> timespec *timeout);
<a name="l00248"></a>00248 
<a name="l00255"></a><a class="code" href="a00041.html#a0312dd3986d22cbba971f0e265f43206">00255</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#aff4c078d6e84e0c273eb321e3c5d0cd6" title="Convert a millisecond timeout into use for high resolution conditional timers.">gettimeout</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout, <span class="keyword">struct</span> timespec *hires)
<a name="l00256"></a>00256         {Conditional::gettimeout(timeout, hires);};
<a name="l00257"></a>00257 
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 <span class="preprocessor">#ifdef  _MSWINDOWS_</span>
<a name="l00260"></a>00260 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a0c0de58a83ec8e45fc8c1fdff0fc488b" title="Lock the conditional&amp;#39;s supporting mutex.">lock</a>(<span class="keywordtype">void</span>)
<a name="l00261"></a>00261         {EnterCriticalSection(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00262"></a>00262 
<a name="l00263"></a>00263     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a919ca7b3262f5da264d8398bae7e839a" title="Unlock the conditional&amp;#39;s supporting mutex.">unlock</a>(<span class="keywordtype">void</span>)
<a name="l00264"></a>00264         {LeaveCriticalSection(&amp;mutex);};
<a name="l00265"></a>00265 
<a name="l00266"></a>00266     <span class="keywordtype">void</span> waitSignal(<span class="keywordtype">void</span>);
<a name="l00267"></a>00267     <span class="keywordtype">void</span> waitBroadcast(<span class="keywordtype">void</span>);
<a name="l00268"></a>00268     
<a name="l00269"></a>00269     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#acfa7200ea5fcd5ddaef196c5ab98d0be" title="Signal the conditional to release one waiting thread.">signal</a>(<span class="keywordtype">void</span>)
<a name="l00270"></a>00270         {Conditional::signal();};
<a name="l00271"></a>00271 
<a name="l00272"></a>00272     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a24b66cad805b3c511d6208c25c740212" title="Signal the conditional to release all waiting threads.">broadcast</a>(<span class="keywordtype">void</span>)
<a name="l00273"></a>00273         {Conditional::broadcast();};
<a name="l00274"></a>00274 
<a name="l00275"></a>00275 <span class="preprocessor">#else</span>
<a name="l00276"></a>00276 <span class="preprocessor"></span>
<a name="l00279"></a><a class="code" href="a00041.html#ad53d9f3e0db7765cd4afeadc98265c01">00279</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a0c0de58a83ec8e45fc8c1fdff0fc488b" title="Lock the conditional&amp;#39;s supporting mutex.">lock</a>(<span class="keywordtype">void</span>)
<a name="l00280"></a>00280         {pthread_mutex_lock(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00281"></a>00281 
<a name="l00285"></a><a class="code" href="a00041.html#a60e5c4ac86cc3e486f4853c9354426ed">00285</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a919ca7b3262f5da264d8398bae7e839a" title="Unlock the conditional&amp;#39;s supporting mutex.">unlock</a>(<span class="keywordtype">void</span>)
<a name="l00286"></a>00286         {pthread_mutex_unlock(&amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00287"></a>00287 
<a name="l00291"></a><a class="code" href="a00041.html#a83d1ebcc1209f640996e43906d9207a9">00291</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> waitSignal(<span class="keywordtype">void</span>)
<a name="l00292"></a>00292         {pthread_cond_wait(&amp;cond, &amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00293"></a>00293 
<a name="l00297"></a><a class="code" href="a00041.html#ace5677f9ecf6fa3f2b2f7424e01185f7">00297</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> waitBroadcast(<span class="keywordtype">void</span>)
<a name="l00298"></a>00298         {pthread_cond_wait(&amp;bcast, &amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>);};
<a name="l00299"></a>00299 
<a name="l00300"></a>00300 
<a name="l00304"></a><a class="code" href="a00041.html#a69cf5d9cff15041a819deb22443e1798">00304</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#acfa7200ea5fcd5ddaef196c5ab98d0be" title="Signal the conditional to release one waiting thread.">signal</a>(<span class="keywordtype">void</span>)
<a name="l00305"></a>00305         {pthread_cond_signal(&amp;cond);};
<a name="l00306"></a>00306 
<a name="l00310"></a><a class="code" href="a00041.html#a48b517f42aede73318bbe5b19ca43443">00310</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a24b66cad805b3c511d6208c25c740212" title="Signal the conditional to release all waiting threads.">broadcast</a>(<span class="keywordtype">void</span>)
<a name="l00311"></a>00311         {pthread_cond_broadcast(&amp;bcast);};
<a name="l00312"></a>00312 <span class="preprocessor">#endif</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="keyword">public</span>:
<a name="l00317"></a>00317     <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>();
<a name="l00318"></a>00318 
<a name="l00322"></a>00322     ~<a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>();
<a name="l00323"></a>00323 
<a name="l00327"></a>00327     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&amp;#39;s protocol.">access</a>(<span class="keywordtype">void</span>);
<a name="l00328"></a>00328 
<a name="l00332"></a>00332     <span class="keywordtype">void</span> <a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc" title="Convenience function to exclusively schedule conditional access.">modify</a>(<span class="keywordtype">void</span>);
<a name="l00333"></a>00333 
<a name="l00337"></a>00337     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00338"></a>00338 
<a name="l00342"></a>00342     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a3209b5b6b32540b77d86a74f8eee58a9" title="Convenience function to commit an exclusive access lock.">commit</a>(<span class="keywordtype">void</span>);
<a name="l00343"></a>00343 
<a name="l00350"></a>00350     <span class="keywordtype">void</span> limit_sharing(<span class="keywordtype">unsigned</span> <a class="code" href="a00214.html#a8049d3aa4d2ad2df40e33d0104fe0c05" title="Template for max value of a type.">max</a>);
<a name="l00351"></a>00351 };
<a name="l00352"></a>00352 
<a name="l00361"></a><a class="code" href="a00168.html">00361</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a> : <span class="keyword">public</span> <a class="code" href="a00169.html" title="Timer class to use when scheduling realtime events.">Timer</a>
<a name="l00362"></a>00362 {
<a name="l00363"></a>00363 <span class="keyword">private</span>:
<a name="l00364"></a>00364 <span class="preprocessor">#ifdef _MSWINDOWS_</span>
<a name="l00365"></a>00365 <span class="preprocessor"></span>    HANDLE event;
<a name="l00366"></a>00366 <span class="preprocessor">#else</span>
<a name="l00367"></a>00367 <span class="preprocessor"></span>    pthread_cond_t cond;
<a name="l00368"></a>00368     <span class="keywordtype">bool</span> signalled;
<a name="l00369"></a>00369 <span class="preprocessor">#endif</span>
<a name="l00370"></a>00370 <span class="preprocessor"></span>    pthread_mutex_t <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>;
<a name="l00371"></a>00371 
<a name="l00372"></a>00372 <span class="keyword">protected</span>:
<a name="l00377"></a>00377     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<span class="keywordtype">void</span>);
<a name="l00378"></a>00378 
<a name="l00383"></a>00383     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00384"></a>00384 
<a name="l00392"></a>00392     <span class="keywordtype">bool</span> <a class="code" href="a00169.html#ab9b8a28bd20bcc694f5a953fdfd73f39" title="Sleep current thread until the specified timer expires.">sync</a>(<span class="keywordtype">void</span>);
<a name="l00393"></a>00393 
<a name="l00394"></a>00394 <span class="keyword">public</span>:
<a name="l00398"></a>00398     <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>(<span class="keywordtype">void</span>);
<a name="l00399"></a>00399 
<a name="l00404"></a>00404     <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00405"></a>00405 
<a name="l00410"></a>00410     <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>(time_t timeout);
<a name="l00411"></a>00411 
<a name="l00415"></a>00415     ~<a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>();
<a name="l00416"></a>00416 
<a name="l00422"></a>00422     <span class="keywordtype">void</span> signal(<span class="keywordtype">void</span>);
<a name="l00423"></a>00423 
<a name="l00430"></a>00430     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00431"></a>00431 
<a name="l00435"></a>00435     <span class="keywordtype">void</span> <a class="code" href="a00169.html#a7f7566f8349b5ae271d35553f0d48ac1" title="A value to use when resetting.">reset</a>(<span class="keywordtype">void</span>);
<a name="l00436"></a>00436 
<a name="l00441"></a><a class="code" href="a00168.html#a57abcd8384e4e21dc7fea661c654aeb3">00441</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> signal(<a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>&amp; timed)
<a name="l00442"></a>00442         {timed.<a class="code" href="a00168.html#acb9f65c901419e55345c7731eea60aea" title="Signal pending event.">signal</a>();};
<a name="l00443"></a>00443 
<a name="l00448"></a><a class="code" href="a00168.html#a614cb2f9a9081c2eeae59dbf3002b684">00448</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00169.html#a7f7566f8349b5ae271d35553f0d48ac1" title="A value to use when resetting.">reset</a>(<a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>&amp; timed)
<a name="l00449"></a>00449         {timed.<a class="code" href="a00168.html#a34a927690eddb0ab914551b1bc1a5233" title="Reset triggered conditional.">reset</a>();};
<a name="l00450"></a>00450 
<a name="l00457"></a><a class="code" href="a00168.html#ac5a643f84411ddcde840e2878efbc2d4">00457</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a>&amp; timed, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l00458"></a>00458         {<span class="keywordflow">return</span> timed.<a class="code" href="a00168.html#ac3b4c3823c2d5b61c7e8d56c69d17d31" title="Wait to be signalled or until timer expires.">wait</a>(timeout);};
<a name="l00459"></a>00459 };
<a name="l00460"></a>00460 
<a name="l00468"></a><a class="code" href="a00114.html">00468</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock</a> : <span class="keyword">private</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>, <span class="keyword">public</span> <a class="code" href="a00052.html" title="An exclusive locking protocol interface base.">Exclusive</a>
<a name="l00469"></a>00469 {
<a name="l00470"></a>00470 <span class="keyword">private</span>:
<a name="l00471"></a>00471     <span class="keywordtype">unsigned</span> waiting;
<a name="l00472"></a>00472     <span class="keywordtype">unsigned</span> lockers;
<a name="l00473"></a>00473     pthread_t locker;
<a name="l00474"></a>00474 
<a name="l00475"></a>00475     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#acd65aabc32e62aa2b78be2e9785daa1d" title="Protocol interface to exclusive lock the object.">Exlock</a>(<span class="keywordtype">void</span>);
<a name="l00476"></a>00476     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#ad294adad1c61fe5d3136a73c561c5ae3" title="Protocol interface to release a lock.">Unlock</a>(<span class="keywordtype">void</span>);
<a name="l00477"></a>00477 
<a name="l00478"></a>00478 <span class="keyword">public</span>:
<a name="l00482"></a>00482     <a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock</a>();
<a name="l00483"></a>00483 
<a name="l00487"></a>00487     <span class="keywordtype">void</span> <a class="code" href="a00040.html#a0c0de58a83ec8e45fc8c1fdff0fc488b" title="Lock the conditional&amp;#39;s supporting mutex.">lock</a>(<span class="keywordtype">void</span>);
<a name="l00488"></a>00488 
<a name="l00492"></a>00492     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00493"></a>00493 
<a name="l00498"></a>00498     <span class="keywordtype">unsigned</span> getLocking(<span class="keywordtype">void</span>);
<a name="l00499"></a>00499 
<a name="l00504"></a>00504     <span class="keywordtype">unsigned</span> getWaiting(<span class="keywordtype">void</span>);
<a name="l00505"></a>00505 
<a name="l00510"></a><a class="code" href="a00114.html#ada4c0c7909d6f8de4cd130cb326700ff">00510</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a0c0de58a83ec8e45fc8c1fdff0fc488b" title="Lock the conditional&amp;#39;s supporting mutex.">lock</a>(<a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock</a>&amp; rex)
<a name="l00511"></a>00511         {rex.<a class="code" href="a00114.html#af146687ce6b60adf7e8f4a658c808df4" title="Acquire or increase locking.">lock</a>();};
<a name="l00512"></a>00512 
<a name="l00517"></a><a class="code" href="a00114.html#a4e1f05cc81d586f84c81d745e3d0c7a1">00517</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock</a>&amp; rex)
<a name="l00518"></a>00518         {rex.<a class="code" href="a00114.html#a16a8e649b1f83c3ebc1d17afb55c9c4a" title="Release or decrease locking.">release</a>();};
<a name="l00519"></a>00519 };
<a name="l00520"></a>00520 
<a name="l00533"></a><a class="code" href="a00115.html">00533</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a> : <span class="keyword">private</span> <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>, <span class="keyword">public</span> <a class="code" href="a00052.html" title="An exclusive locking protocol interface base.">Exclusive</a>, <span class="keyword">public</span> <a class="code" href="a00135.html" title="An exclusive locking protocol interface base.">Shared</a>
<a name="l00534"></a>00534 {
<a name="l00535"></a>00535 <span class="keyword">private</span>:
<a name="l00536"></a>00536     <span class="keywordtype">unsigned</span> writers;
<a name="l00537"></a>00537     pthread_t writeid;
<a name="l00538"></a>00538 
<a name="l00539"></a>00539     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#acd65aabc32e62aa2b78be2e9785daa1d" title="Protocol interface to exclusive lock the object.">Exlock</a>(<span class="keywordtype">void</span>);
<a name="l00540"></a>00540     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a71cd7fc1ae1ae11106f91f0793e351a7" title="Protocol interface to share lock the object.">Shlock</a>(<span class="keywordtype">void</span>);
<a name="l00541"></a>00541     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#ad294adad1c61fe5d3136a73c561c5ae3" title="Protocol interface to release a lock.">Unlock</a>(<span class="keywordtype">void</span>);
<a name="l00542"></a>00542 
<a name="l00543"></a>00543 <span class="keyword">public</span>:
<a name="l00551"></a><a class="code" href="a00116.html">00551</a>     <span class="keyword">class </span>__EXPORT <a class="code" href="a00116.html" title="Gaurd class to apply scope based access locking to objects.">gaurd_reader</a>
<a name="l00552"></a>00552     {
<a name="l00553"></a>00553     <span class="keyword">private</span>:
<a name="l00554"></a>00554         <span class="keywordtype">void</span> *object;
<a name="l00555"></a>00555     
<a name="l00556"></a>00556     <span class="keyword">public</span>:
<a name="l00561"></a>00561         <a class="code" href="a00116.html" title="Gaurd class to apply scope based access locking to objects.">gaurd_reader</a>();
<a name="l00562"></a>00562 
<a name="l00567"></a>00567         <a class="code" href="a00116.html" title="Gaurd class to apply scope based access locking to objects.">gaurd_reader</a>(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l00568"></a>00568 
<a name="l00572"></a>00572         ~<a class="code" href="a00116.html" title="Gaurd class to apply scope based access locking to objects.">gaurd_reader</a>();
<a name="l00573"></a>00573         
<a name="l00579"></a>00579         <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">void</span> *object);
<a name="l00580"></a>00580 
<a name="l00584"></a>00584         <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00585"></a>00585 
<a name="l00591"></a><a class="code" href="a00116.html#aee7e5bfd1593272b357004b946eb801c">00591</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(<span class="keywordtype">void</span> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>)
<a name="l00592"></a>00592             {<span class="keyword">set</span>(pointer);};
<a name="l00593"></a>00593     };
<a name="l00594"></a>00594 
<a name="l00602"></a><a class="code" href="a00117.html">00602</a>     <span class="keyword">class </span>__EXPORT <a class="code" href="a00117.html" title="Gaurd class to apply scope based exclusive locking to objects.">gaurd_writer</a>
<a name="l00603"></a>00603     {
<a name="l00604"></a>00604     <span class="keyword">private</span>:
<a name="l00605"></a>00605         <span class="keywordtype">void</span> *object;
<a name="l00606"></a>00606     
<a name="l00607"></a>00607     <span class="keyword">public</span>:
<a name="l00612"></a>00612         <a class="code" href="a00117.html" title="Gaurd class to apply scope based exclusive locking to objects.">gaurd_writer</a>();
<a name="l00613"></a>00613 
<a name="l00618"></a>00618         <a class="code" href="a00117.html" title="Gaurd class to apply scope based exclusive locking to objects.">gaurd_writer</a>(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l00619"></a>00619 
<a name="l00623"></a>00623         ~<a class="code" href="a00117.html" title="Gaurd class to apply scope based exclusive locking to objects.">gaurd_writer</a>();
<a name="l00624"></a>00624         
<a name="l00630"></a>00630         <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">void</span> *object);
<a name="l00631"></a>00631 
<a name="l00635"></a>00635         <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00636"></a>00636 
<a name="l00642"></a><a class="code" href="a00117.html#a4887e996aa09247b1670ce43e7355907">00642</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(<span class="keywordtype">void</span> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>)
<a name="l00643"></a>00643             {<span class="keyword">set</span>(pointer);};
<a name="l00644"></a>00644     };
<a name="l00645"></a>00645 
<a name="l00649"></a>00649     <a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a>();
<a name="l00650"></a>00650 
<a name="l00656"></a>00656     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc" title="Convenience function to exclusively schedule conditional access.">modify</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf);
<a name="l00657"></a>00657 
<a name="l00663"></a>00663     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&amp;#39;s protocol.">access</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf);
<a name="l00664"></a>00664 
<a name="l00671"></a>00671     <span class="keyword">static</span> <span class="keywordtype">void</span> indexing(<span class="keywordtype">unsigned</span> size);
<a name="l00672"></a>00672 
<a name="l00680"></a>00680     <span class="keyword">static</span> <span class="keywordtype">bool</span> writer(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf);
<a name="l00681"></a>00681 
<a name="l00689"></a>00689     <span class="keyword">static</span> <span class="keywordtype">bool</span> reader(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf);
<a name="l00690"></a>00690 
<a name="l00695"></a>00695     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l00696"></a>00696 
<a name="l00700"></a>00700     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l00701"></a>00701 
<a name="l00706"></a>00706     <span class="keywordtype">unsigned</span> getAccess(<span class="keywordtype">void</span>);
<a name="l00707"></a>00707 
<a name="l00712"></a>00712     <span class="keywordtype">unsigned</span> getModify(<span class="keywordtype">void</span>);
<a name="l00713"></a>00713 
<a name="l00718"></a>00718     <span class="keywordtype">unsigned</span> getWaiting(<span class="keywordtype">void</span>);
<a name="l00719"></a>00719 
<a name="l00726"></a><a class="code" href="a00115.html#a889b828220b332d5d0610353d6a7cae4">00726</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc" title="Convenience function to exclusively schedule conditional access.">modify</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l00727"></a>00727         {<span class="keywordflow">return</span> lock.<a class="code" href="a00115.html#aa2c85cefd6ae9b8a3fbc97b74d78f4e4" title="Request modify (write) access through the lock.">modify</a>(timeout);};
<a name="l00728"></a>00728 
<a name="l00735"></a><a class="code" href="a00115.html#af4a6c027c5600c27902d3b7df3190e93">00735</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&amp;#39;s protocol.">access</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l00736"></a>00736         {<span class="keywordflow">return</span> lock.<a class="code" href="a00115.html#a7960c0e198223a7c613bbdc5cbd4805f" title="Request shared (read) access through the lock.">access</a>(timeout);};
<a name="l00737"></a>00737 
<a name="l00742"></a><a class="code" href="a00115.html#a6cfecdaad1e532905a310acda35cc287">00742</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00743"></a>00743         {lock.<a class="code" href="a00115.html#a58854ccc82cc34c0203a722fb7212a02" title="Release an arbitrary object that has been protected by a rwlock.">release</a>();};
<a name="l00744"></a>00744 };
<a name="l00745"></a>00745 
<a name="l00756"></a><a class="code" href="a00112.html">00756</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00112.html" title="Class for resource bound memory pools between threads.">ReusableAllocator</a> : <span class="keyword">protected</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l00757"></a>00757 {
<a name="l00758"></a>00758 <span class="keyword">protected</span>:
<a name="l00759"></a>00759     <a class="code" href="a00113.html" title="Reusable objects for forming private heaps.">ReusableObject</a> *freelist;
<a name="l00760"></a>00760     <span class="keywordtype">unsigned</span> waiting;
<a name="l00761"></a>00761 
<a name="l00765"></a>00765     <a class="code" href="a00112.html" title="Class for resource bound memory pools between threads.">ReusableAllocator</a>();
<a name="l00766"></a>00766 
<a name="l00772"></a><a class="code" href="a00112.html#a9b4b548990e2c6a0c1e99b71cafdb94a">00772</a>     <span class="keyword">inline</span> <a class="code" href="a00113.html" title="Reusable objects for forming private heaps.">ReusableObject</a> *next(<a class="code" href="a00113.html" title="Reusable objects for forming private heaps.">ReusableObject</a> *<span class="keywordtype">object</span>)
<a name="l00773"></a>00773         {<span class="keywordflow">return</span> <span class="keywordtype">object</span>-&gt;getNext();};
<a name="l00774"></a>00774     
<a name="l00779"></a>00779     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00113.html" title="Reusable objects for forming private heaps.">ReusableObject</a> *<span class="keywordtype">object</span>);
<a name="l00780"></a>00780 };
<a name="l00781"></a>00781 
<a name="l00792"></a><a class="code" href="a00042.html">00792</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a> : <span class="keyword">protected</span> <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>, <span class="keyword">public</span> <a class="code" href="a00135.html" title="An exclusive locking protocol interface base.">Shared</a>
<a name="l00793"></a>00793 {
<a name="l00794"></a>00794 <span class="keyword">private</span>:
<a name="l00795"></a>00795     <span class="keyword">class </span>Context : <span class="keyword">public</span> <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a>
<a name="l00796"></a>00796     {
<a name="l00797"></a>00797     <span class="keyword">public</span>:
<a name="l00798"></a>00798         <span class="keyword">inline</span> Context(<a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a> **root) : <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a>(root) {};
<a name="l00799"></a>00799 
<a name="l00800"></a>00800         pthread_t thread;
<a name="l00801"></a>00801         <span class="keywordtype">unsigned</span> count;
<a name="l00802"></a>00802     };
<a name="l00803"></a>00803 
<a name="l00804"></a>00804     <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a> *contexts;
<a name="l00805"></a>00805 
<a name="l00806"></a>00806     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a71cd7fc1ae1ae11106f91f0793e351a7" title="Protocol interface to share lock the object.">Shlock</a>(<span class="keywordtype">void</span>);
<a name="l00807"></a>00807     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a4de5bcb4dd1285f3a20c2ccca95b945c" title="Protocol interface to release a lock.">Unlock</a>(<span class="keywordtype">void</span>);
<a name="l00808"></a>00808     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#adee2402386a18c22b1acd4dc29b53237" title="Convert object to an exclusive lock.">Exclusive</a>(<span class="keywordtype">void</span>);
<a name="l00809"></a>00809     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a1ba74aab1d376ee7521d7989b4d86f28" title="Share the lock with other referencers.">Share</a>(<span class="keywordtype">void</span>);
<a name="l00810"></a>00810     __LOCAL Context *getContext(<span class="keywordtype">void</span>);
<a name="l00811"></a>00811 
<a name="l00812"></a>00812 <span class="keyword">public</span>:
<a name="l00816"></a>00816     <a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>();
<a name="l00817"></a>00817 
<a name="l00821"></a>00821     ~<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>();
<a name="l00822"></a>00822 
<a name="l00826"></a>00826     <span class="keywordtype">void</span> <a class="code" href="a00041.html#a808998cdbbf86426abd0091947d14516" title="Exclusive mode write thread scheduling.">modify</a>(<span class="keywordtype">void</span>);
<a name="l00827"></a>00827 
<a name="l00831"></a>00831     <span class="keywordtype">void</span> <a class="code" href="a00041.html#aae4efc6f4ca22b3871638cef56db38a7" title="Complete exclusive mode write scheduling.">commit</a>(<span class="keywordtype">void</span>);
<a name="l00832"></a>00832 
<a name="l00836"></a>00836     <span class="keywordtype">void</span> <a class="code" href="a00041.html#a46436dd5ff53ca22b8d504409ecb7d87" title="Access mode shared thread scheduling.">access</a>(<span class="keywordtype">void</span>);
<a name="l00837"></a>00837 
<a name="l00841"></a>00841     <span class="keywordtype">void</span> <a class="code" href="a00041.html#a51094b41fa291d5ad27770c84babed10" title="Release access mode read scheduling.">release</a>(<span class="keywordtype">void</span>);
<a name="l00842"></a>00842 
<a name="l00847"></a>00847     <span class="keywordtype">void</span> <a class="code" href="a00214.html#aeaed52a287086b5ba39effca9e7b037d" title="Convenience function to exclusive lock shared object through it&amp;#39;s protocol.">exclusive</a>(<span class="keywordtype">void</span>);
<a name="l00848"></a>00848 
<a name="l00852"></a>00852     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">share</a>(<span class="keywordtype">void</span>);
<a name="l00853"></a>00853 
<a name="l00857"></a>00857     <span class="keywordtype">unsigned</span> getReaders(<span class="keywordtype">void</span>);
<a name="l00858"></a>00858 
<a name="l00862"></a>00862     <span class="keywordtype">unsigned</span> getWaiters(<span class="keywordtype">void</span>);
<a name="l00863"></a>00863 
<a name="l00868"></a><a class="code" href="a00042.html#ad64970e0fc81f4b11fd849242c84941f">00868</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00041.html#a808998cdbbf86426abd0091947d14516" title="Exclusive mode write thread scheduling.">modify</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00869"></a>00869         {lock.<a class="code" href="a00042.html#a01d9be1b777988d54fc35327e049c47c" title="Acquire write (exclusive modify) lock.">modify</a>();};
<a name="l00870"></a>00870 
<a name="l00875"></a><a class="code" href="a00042.html#a6779c6adc2215af899d8084c167626ea">00875</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00041.html#aae4efc6f4ca22b3871638cef56db38a7" title="Complete exclusive mode write scheduling.">commit</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00876"></a>00876         {lock.<a class="code" href="a00042.html#ad3f81d8a9b81fd9de6d11bb566326eae" title="Commit changes / release a modify lock.">commit</a>();};
<a name="l00877"></a>00877 
<a name="l00882"></a><a class="code" href="a00042.html#a5f182d14915804ed05b02e194d983e8c">00882</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00041.html#a51094b41fa291d5ad27770c84babed10" title="Release access mode read scheduling.">release</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00883"></a>00883         {lock.<a class="code" href="a00042.html#aae9e8cd11043e975dcc91eb0378b3c8d" title="Release a shared lock.">release</a>();};
<a name="l00884"></a>00884 
<a name="l00889"></a><a class="code" href="a00042.html#ae1993974657c20ef26a812b355926a0c">00889</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00041.html#a46436dd5ff53ca22b8d504409ecb7d87" title="Access mode shared thread scheduling.">access</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00890"></a>00890         {lock.<a class="code" href="a00042.html#ae374d4deed36bdc27706350bd957bb06" title="Acquire access (shared read) lock.">access</a>();};
<a name="l00891"></a>00891 
<a name="l00896"></a><a class="code" href="a00042.html#a04441e0299c0daa33917d5b1e18425d9">00896</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#aeaed52a287086b5ba39effca9e7b037d" title="Convenience function to exclusive lock shared object through it&amp;#39;s protocol.">exclusive</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00897"></a>00897         {lock.<a class="code" href="a00042.html#a9daadc3d99bd3cd6c8467e33e0b1496e" title="Convert read lock into exclusive (write/modify) access.">exclusive</a>();};
<a name="l00898"></a>00898 
<a name="l00903"></a><a class="code" href="a00042.html#a7f2d8cdc302b43641cceda045d1bb519">00903</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">share</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l00904"></a>00904         {lock.<a class="code" href="a00042.html#a5ddcb0a7691af3c157bf5d4de3e3a5b4" title="Return an exclusive access lock back to share mode.">share</a>();};
<a name="l00905"></a>00905 };  
<a name="l00906"></a>00906 
<a name="l00919"></a><a class="code" href="a00032.html">00919</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a> : <span class="keyword">private</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a> 
<a name="l00920"></a>00920 {
<a name="l00921"></a>00921 <span class="keyword">private</span>:
<a name="l00922"></a>00922     <span class="keywordtype">unsigned</span> count;
<a name="l00923"></a>00923     <span class="keywordtype">unsigned</span> waits;
<a name="l00924"></a>00924 
<a name="l00925"></a>00925 <span class="keyword">public</span>:
<a name="l00930"></a>00930     <a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>(<span class="keywordtype">unsigned</span> count);
<a name="l00931"></a>00931 
<a name="l00935"></a>00935     ~<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>();
<a name="l00936"></a>00936 
<a name="l00942"></a>00942     <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">unsigned</span> count);
<a name="l00943"></a>00943 
<a name="l00947"></a>00947     <span class="keywordtype">void</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<span class="keywordtype">void</span>);
<a name="l00948"></a>00948 
<a name="l00955"></a>00955     <span class="keywordtype">bool</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l00956"></a>00956 
<a name="l00961"></a><a class="code" href="a00032.html#ab4e354bdd4b7d22bc1a5fb7fdd3210e1">00961</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>&amp; sync)
<a name="l00962"></a>00962         {sync.<a class="code" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c" title="Wait at the barrier until the count of threads waiting is reached.">wait</a>();};
<a name="l00963"></a>00963 
<a name="l00970"></a><a class="code" href="a00032.html#a294528866e7d6587a01d008aa8bb9e73">00970</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>&amp; sync, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l00971"></a>00971         {<span class="keywordflow">return</span> sync.<a class="code" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c" title="Wait at the barrier until the count of threads waiting is reached.">wait</a>(timeout);};
<a name="l00972"></a>00972 
<a name="l00973"></a>00973 
<a name="l00979"></a><a class="code" href="a00032.html#a66f3d5eb7ee03c10d0be9a675c7c4fcf">00979</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <span class="keyword">set</span>(<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>&amp; sync, <span class="keywordtype">unsigned</span> count)
<a name="l00980"></a>00980         {sync.set(count);};
<a name="l00981"></a>00981 };
<a name="l00982"></a>00982 
<a name="l00991"></a><a class="code" href="a00132.html">00991</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a> : <span class="keyword">public</span> <a class="code" href="a00135.html" title="An exclusive locking protocol interface base.">Shared</a>, <span class="keyword">private</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l00992"></a>00992 {
<a name="l00993"></a>00993 <span class="keyword">private</span>:
<a name="l00994"></a>00994     <span class="keywordtype">unsigned</span> count, waits, used;
<a name="l00995"></a>00995 
<a name="l00996"></a>00996     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a71cd7fc1ae1ae11106f91f0793e351a7" title="Protocol interface to share lock the object.">Shlock</a>(<span class="keywordtype">void</span>);
<a name="l00997"></a>00997     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00135.html#a4de5bcb4dd1285f3a20c2ccca95b945c" title="Protocol interface to release a lock.">Unlock</a>(<span class="keywordtype">void</span>);
<a name="l00998"></a>00998 
<a name="l00999"></a>00999 <span class="keyword">public</span>:
<a name="l01003"></a>01003     <a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>(<span class="keywordtype">unsigned</span> count = 0);
<a name="l01004"></a>01004 
<a name="l01009"></a>01009     <span class="keywordtype">void</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<span class="keywordtype">void</span>);
<a name="l01010"></a>01010 
<a name="l01018"></a>01018     <span class="keywordtype">bool</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l01019"></a>01019 
<a name="l01024"></a>01024     <span class="keywordtype">unsigned</span> getCount(<span class="keywordtype">void</span>);
<a name="l01025"></a>01025 
<a name="l01030"></a>01030     <span class="keywordtype">unsigned</span> getUsed(<span class="keywordtype">void</span>);
<a name="l01031"></a>01031 
<a name="l01036"></a>01036     <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">unsigned</span> count);
<a name="l01037"></a>01037 
<a name="l01041"></a>01041     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l01042"></a>01042 
<a name="l01046"></a><a class="code" href="a00132.html#a8915c76460248620d644d6acb5bda668">01046</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> operator++(<span class="keywordtype">void</span>)
<a name="l01047"></a>01047         {<a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>();};
<a name="l01048"></a>01048 
<a name="l01052"></a><a class="code" href="a00132.html#a4776718b7fc5bd693be9dfc38dcf6bf6">01052</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> operator--(<span class="keywordtype">void</span>)
<a name="l01053"></a>01053         {<a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>();};
<a name="l01054"></a>01054 
<a name="l01059"></a><a class="code" href="a00132.html#a72969f497a03901596d08b31ca1fe2d0">01059</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>&amp; sync)
<a name="l01060"></a>01060         {sync.<a class="code" href="a00132.html#a56ec938f1b92ac4395e63489e7b1103c" title="Wait until the semphore usage count is less than the thread limit.">wait</a>();};
<a name="l01061"></a>01061 
<a name="l01068"></a><a class="code" href="a00132.html#a0d1a2804e69093632ff027a55b4d1b55">01068</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a00040.html#a6e3df297dbc742f3180bfe8862d166a3" title="Wait (block) until signalled.">wait</a>(<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>&amp; sync, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l01069"></a>01069         {<span class="keywordflow">return</span> sync.<a class="code" href="a00132.html#a56ec938f1b92ac4395e63489e7b1103c" title="Wait until the semphore usage count is less than the thread limit.">wait</a>(timeout);};
<a name="l01070"></a>01070 
<a name="l01075"></a><a class="code" href="a00132.html#acce63e350f70c4daaf374d02f279cbfd">01075</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>&amp; sync)
<a name="l01076"></a>01076         {sync.<a class="code" href="a00132.html#a884c8c2b1a5cf2df607cffb668b447fb" title="Release the semaphore after waiting for it.">release</a>();};
<a name="l01077"></a>01077 };
<a name="l01078"></a>01078 
<a name="l01092"></a><a class="code" href="a00086.html">01092</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a> : <span class="keyword">public</span> <a class="code" href="a00052.html" title="An exclusive locking protocol interface base.">Exclusive</a>
<a name="l01093"></a>01093 {
<a name="l01094"></a>01094 <span class="keyword">private</span>:
<a name="l01095"></a>01095     pthread_mutex_t mlock;
<a name="l01096"></a>01096 
<a name="l01097"></a>01097     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#acd65aabc32e62aa2b78be2e9785daa1d" title="Protocol interface to exclusive lock the object.">Exlock</a>(<span class="keywordtype">void</span>);
<a name="l01098"></a>01098     __LOCAL <span class="keywordtype">void</span> <a class="code" href="a00052.html#ad294adad1c61fe5d3136a73c561c5ae3" title="Protocol interface to release a lock.">Unlock</a>(<span class="keywordtype">void</span>);
<a name="l01099"></a>01099         
<a name="l01100"></a>01100 <span class="keyword">public</span>:
<a name="l01108"></a><a class="code" href="a00087.html">01108</a>     <span class="keyword">class </span>__EXPORT <a class="code" href="a00087.html" title="Gaurd class to apply scope based mutex locking to objects.">gaurd</a> 
<a name="l01109"></a>01109     {
<a name="l01110"></a>01110     <span class="keyword">private</span>:
<a name="l01111"></a>01111         <span class="keywordtype">void</span> *object;
<a name="l01112"></a>01112     
<a name="l01113"></a>01113     <span class="keyword">public</span>:
<a name="l01118"></a>01118         <a class="code" href="a00087.html" title="Gaurd class to apply scope based mutex locking to objects.">gaurd</a>();
<a name="l01119"></a>01119 
<a name="l01124"></a>01124         <a class="code" href="a00087.html" title="Gaurd class to apply scope based mutex locking to objects.">gaurd</a>(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l01125"></a>01125 
<a name="l01129"></a>01129         ~<a class="code" href="a00087.html" title="Gaurd class to apply scope based mutex locking to objects.">gaurd</a>();
<a name="l01130"></a>01130         
<a name="l01136"></a>01136         <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">void</span> *object);
<a name="l01137"></a>01137 
<a name="l01141"></a>01141         <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l01142"></a>01142 
<a name="l01148"></a><a class="code" href="a00087.html#a41a49cb6b2371ea53ab3f1198e90a729">01148</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(<span class="keywordtype">void</span> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>)
<a name="l01149"></a>01149             {<span class="keyword">set</span>(pointer);};
<a name="l01150"></a>01150     };
<a name="l01151"></a>01151 
<a name="l01152"></a>01152 
<a name="l01156"></a>01156     <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>();
<a name="l01157"></a>01157 
<a name="l01161"></a>01161     ~<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>();
<a name="l01162"></a>01162 
<a name="l01166"></a><a class="code" href="a00086.html#abe2189d0938d3061b185cd6d30f97ab2">01166</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a4ad966e53a1365b019692202af34e353" title="Convenience function to acquire a mutex.">acquire</a>(<span class="keywordtype">void</span>)
<a name="l01167"></a>01167         {pthread_mutex_lock(&amp;mlock);};
<a name="l01168"></a>01168 
<a name="l01172"></a><a class="code" href="a00086.html#abd0edc0ca39bbdbb5e9e5e44981f1d1a">01172</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<span class="keywordtype">void</span>)
<a name="l01173"></a>01173         {pthread_mutex_lock(&amp;mlock);};
<a name="l01174"></a>01174 
<a name="l01178"></a><a class="code" href="a00086.html#ae5064321d307142c1458171c79dff67c">01178</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a140946704e1b4c4e9c3b14081c1d300d" title="Convenience function to unlock an exclusive object through it&amp;#39;s protocol.">unlock</a>(<span class="keywordtype">void</span>)
<a name="l01179"></a>01179         {pthread_mutex_unlock(&amp;mlock);};
<a name="l01180"></a>01180 
<a name="l01184"></a><a class="code" href="a00086.html#aeb2971d84f8f9372b58f5f8cd329c7c6">01184</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>)
<a name="l01185"></a>01185         {pthread_mutex_unlock(&amp;mlock);};
<a name="l01186"></a>01186 
<a name="l01191"></a><a class="code" href="a00086.html#a3b280d0feaf1561fd12400268bd8f6e8">01191</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a4ad966e53a1365b019692202af34e353" title="Convenience function to acquire a mutex.">acquire</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01192"></a>01192         {pthread_mutex_lock(&amp;lock.mlock);};
<a name="l01193"></a>01193 
<a name="l01198"></a><a class="code" href="a00086.html#a91fe293fe2c523e7d91b8982cf573d3e">01198</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01199"></a>01199         {pthread_mutex_lock(&amp;lock.mlock);};
<a name="l01200"></a>01200 
<a name="l01205"></a><a class="code" href="a00086.html#ae9abe5762eb1b5d671e96f6d56239ca4">01205</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a140946704e1b4c4e9c3b14081c1d300d" title="Convenience function to unlock an exclusive object through it&amp;#39;s protocol.">unlock</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01206"></a>01206         {pthread_mutex_unlock(&amp;lock.mlock);};
<a name="l01207"></a>01207 
<a name="l01212"></a><a class="code" href="a00086.html#a0e621b9d88aebc92fc627f7d62ba0d55">01212</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>&amp; <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01213"></a>01213         {pthread_mutex_unlock(&amp;lock.mlock);};
<a name="l01214"></a>01214 
<a name="l01219"></a><a class="code" href="a00086.html#a7bb3ed60ecc4c2ceef6a27095ec9ca7f">01219</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a4ad966e53a1365b019692202af34e353" title="Convenience function to acquire a mutex.">acquire</a>(pthread_mutex_t *<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01220"></a>01220         {pthread_mutex_lock(lock);};
<a name="l01221"></a>01221 
<a name="l01226"></a><a class="code" href="a00086.html#a41059786c794e82a98e14087123d30ae">01226</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(pthread_mutex_t *<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01227"></a>01227         {pthread_mutex_lock(lock);};
<a name="l01228"></a>01228 
<a name="l01233"></a><a class="code" href="a00086.html#a4e580963a713397849ece61f876a2c6f">01233</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a140946704e1b4c4e9c3b14081c1d300d" title="Convenience function to unlock an exclusive object through it&amp;#39;s protocol.">unlock</a>(pthread_mutex_t *<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01234"></a>01234         {pthread_mutex_unlock(lock);};
<a name="l01235"></a>01235 
<a name="l01240"></a><a class="code" href="a00086.html#a50e4b99ed5d226d7cd49b4d435cd2994">01240</a>     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(pthread_mutex_t *<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l01241"></a>01241         {pthread_mutex_unlock(lock);};
<a name="l01242"></a>01242 
<a name="l01249"></a>01249     <span class="keyword">static</span> <span class="keywordtype">void</span> indexing(<span class="keywordtype">unsigned</span> size);
<a name="l01250"></a>01250 
<a name="l01256"></a>01256     <span class="keyword">static</span> <span class="keywordtype">void</span> protect(<span class="keywordtype">void</span> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l01257"></a>01257 
<a name="l01262"></a>01262     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l01263"></a>01263 };
<a name="l01264"></a>01264 
<a name="l01273"></a><a class="code" href="a00030.html">01273</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>
<a name="l01274"></a>01274 {
<a name="l01275"></a>01275 <span class="keyword">private</span>:
<a name="l01276"></a>01276     <span class="comment">// cannot copy...</span>
<a name="l01277"></a>01277     <span class="keyword">inline</span> <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>(<span class="keyword">const</span> <a class="code" href="a00029.html" title="A general purpose smart pointer helper class.">auto_pointer</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>) {};
<a name="l01278"></a>01278 
<a name="l01279"></a>01279 <span class="keyword">protected</span>:
<a name="l01280"></a>01280     <span class="keywordtype">void</span> *object;
<a name="l01281"></a>01281     
<a name="l01282"></a>01282     <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>();
<a name="l01283"></a>01283 
<a name="l01284"></a>01284 <span class="keyword">public</span>:
<a name="l01289"></a>01289     <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l01290"></a>01290     
<a name="l01295"></a>01295     ~<a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>();
<a name="l01296"></a>01296 
<a name="l01300"></a>01300     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l01301"></a>01301 
<a name="l01306"></a><a class="code" href="a00030.html#adce561f4efcc101fe00521b04fb80b18">01306</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!()<span class="keyword"> const</span>
<a name="l01307"></a>01307 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keywordtype">object</span> == NULL;};
<a name="l01308"></a>01308 
<a name="l01313"></a><a class="code" href="a00030.html#a025d67ae1feac04b5262f9dc6b46bd7a">01313</a>     <span class="keyword">inline</span> operator bool()<span class="keyword"> const</span>
<a name="l01314"></a>01314 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keywordtype">object</span> != NULL;};
<a name="l01315"></a>01315 
<a name="l01322"></a>01322     <span class="keywordtype">void</span> operator=(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>);
<a name="l01323"></a>01323 };  
<a name="l01324"></a>01324 
<a name="l01336"></a><a class="code" href="a00074.html">01336</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a>
<a name="l01337"></a>01337 {
<a name="l01338"></a>01338 <span class="keyword">private</span>:
<a name="l01339"></a>01339     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>;
<a name="l01340"></a>01340     pthread_mutex_t <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>;
<a name="l01341"></a>01341     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>;
<a name="l01342"></a>01342 
<a name="l01343"></a>01343 <span class="keyword">protected</span>:
<a name="l01347"></a>01347     <a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a>();
<a name="l01348"></a>01348 
<a name="l01353"></a>01353     <span class="keywordtype">void</span> replace(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>);
<a name="l01354"></a>01354 
<a name="l01359"></a>01359     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *dup(<span class="keywordtype">void</span>);
<a name="l01360"></a>01360 
<a name="l01365"></a><a class="code" href="a00074.html#aaccfd4426c0e71db69ead8756e79e319">01365</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>)
<a name="l01366"></a>01366         {replace(<span class="keywordtype">object</span>);};
<a name="l01367"></a>01367 };
<a name="l01368"></a>01368 
<a name="l01377"></a><a class="code" href="a00140.html">01377</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a>
<a name="l01378"></a>01378 {
<a name="l01379"></a>01379 <span class="keyword">protected</span>:
<a name="l01380"></a>01380     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a>;
<a name="l01381"></a>01381 
<a name="l01390"></a>01390     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a3209b5b6b32540b77d86a74f8eee58a9" title="Convenience function to commit an exclusive access lock.">commit</a>(<a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l01391"></a>01391 
<a name="l01392"></a>01392 <span class="keyword">public</span>:
<a name="l01396"></a>01396     <span class="keyword">virtual</span> ~<a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a>();
<a name="l01397"></a>01397 };
<a name="l01398"></a>01398 
<a name="l01409"></a><a class="code" href="a00141.html">01409</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a> : <span class="keyword">protected</span> <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a>
<a name="l01410"></a>01410 {
<a name="l01411"></a>01411 <span class="keyword">private</span>:
<a name="l01412"></a>01412     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>;
<a name="l01413"></a>01413     <a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a> *<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>;
<a name="l01414"></a>01414 
<a name="l01415"></a>01415 <span class="keyword">protected</span>:
<a name="l01419"></a>01419     <a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a>();
<a name="l01420"></a>01420     
<a name="l01424"></a>01424     ~<a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a>();
<a name="l01425"></a>01425 
<a name="l01432"></a>01432     <span class="keywordtype">void</span> replace(<a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a> *<span class="keywordtype">object</span>);
<a name="l01433"></a>01433 
<a name="l01440"></a>01440     <a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a> *<a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">share</a>(<span class="keywordtype">void</span>);
<a name="l01441"></a>01441 };
<a name="l01442"></a>01442 
<a name="l01453"></a><a class="code" href="a00166.html">01453</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00166.html" title="An abstract class for defining classes that operate as a thread.">Thread</a>
<a name="l01454"></a>01454 {
<a name="l01455"></a>01455 <span class="keyword">protected</span>:
<a name="l01456"></a>01456     pthread_t tid;
<a name="l01457"></a>01457     <span class="keywordtype">size_t</span> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>;
<a name="l01458"></a>01458     <span class="keywordtype">int</span> priority;
<a name="l01459"></a>01459 
<a name="l01465"></a>01465     <a class="code" href="a00166.html" title="An abstract class for defining classes that operate as a thread.">Thread</a>(<span class="keywordtype">size_t</span> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a> = 0);
<a name="l01466"></a>01466 
<a name="l01467"></a>01467 <span class="keyword">public</span>:
<a name="l01474"></a>01474     <span class="keywordtype">void</span> setPriority(<span class="keywordtype">void</span>);
<a name="l01475"></a>01475 
<a name="l01480"></a>01480     <span class="keyword">static</span> <span class="keywordtype">void</span> yield(<span class="keywordtype">void</span>);
<a name="l01481"></a>01481 
<a name="l01486"></a>01486     <span class="keyword">static</span> <span class="keywordtype">void</span> sleep(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l01487"></a>01487 
<a name="l01491"></a>01491     <span class="keyword">virtual</span> <span class="keywordtype">void</span> run(<span class="keywordtype">void</span>) = 0;
<a name="l01492"></a>01492     
<a name="l01496"></a>01496     <span class="keyword">virtual</span> ~<a class="code" href="a00166.html" title="An abstract class for defining classes that operate as a thread.">Thread</a>();
<a name="l01497"></a>01497 
<a name="l01506"></a>01506     <span class="keyword">virtual</span> <span class="keywordtype">void</span> exit(<span class="keywordtype">void</span>);
<a name="l01507"></a>01507 
<a name="l01511"></a>01511     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00201.html#a5fc126f9a4406cb2d0d054488cf00809" title="Template function to initialize memory by invoking default constructor.">init</a>(<span class="keywordtype">void</span>);
<a name="l01512"></a>01512 
<a name="l01518"></a>01518     <span class="keyword">static</span> <span class="keywordtype">void</span> policy(<span class="keywordtype">int</span> polid);
<a name="l01519"></a>01519 
<a name="l01524"></a>01524     <span class="keyword">static</span> <span class="keywordtype">void</span> concurrency(<span class="keywordtype">int</span> level);
<a name="l01525"></a>01525 
<a name="l01532"></a>01532     <span class="keyword">static</span> <span class="keywordtype">bool</span> equal(pthread_t thread1, pthread_t thread2);
<a name="l01533"></a>01533 
<a name="l01538"></a>01538 <span class="preprocessor">#ifdef  __PTH__</span>
<a name="l01539"></a>01539 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keyword">static</span> pthread_t <span class="keyword">self</span>(void)
<a name="l01540"></a>01540         {<span class="keywordflow">return</span> pth_self();};
<a name="l01541"></a>01541 <span class="preprocessor">#else</span>
<a name="l01542"></a><a class="code" href="a00166.html#a1991d3af92a7dba4c513acfc4e363424">01542</a> <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keyword">static</span> pthread_t <span class="keyword">self</span>(void)
<a name="l01543"></a>01543         {<span class="keywordflow">return</span> pthread_self();};
<a name="l01544"></a>01544 <span class="preprocessor">#endif</span>
<a name="l01545"></a>01545 <span class="preprocessor"></span>};
<a name="l01546"></a>01546 
<a name="l01557"></a><a class="code" href="a00058.html">01557</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00058.html" title="A child thread object that may be joined by parent.">JoinableThread</a> : <span class="keyword">protected</span> <a class="code" href="a00166.html" title="An abstract class for defining classes that operate as a thread.">Thread</a>
<a name="l01558"></a>01558 {
<a name="l01559"></a>01559 <span class="keyword">private</span>:
<a name="l01560"></a>01560 <span class="preprocessor">#ifdef  _MSWINDOWS_</span>
<a name="l01561"></a>01561 <span class="preprocessor"></span>    HANDLE joining;
<a name="l01562"></a>01562 <span class="preprocessor">#else</span>
<a name="l01563"></a>01563 <span class="preprocessor"></span>    <span class="keyword">volatile</span> <span class="keywordtype">bool</span> running;
<a name="l01564"></a>01564 <span class="preprocessor">#endif</span>
<a name="l01565"></a>01565 <span class="preprocessor"></span>
<a name="l01566"></a>01566 <span class="keyword">protected</span>:
<a name="l01571"></a>01571     <a class="code" href="a00058.html" title="A child thread object that may be joined by parent.">JoinableThread</a>(<span class="keywordtype">size_t</span> size = 0);
<a name="l01572"></a>01572 
<a name="l01577"></a>01577     <span class="keyword">virtual</span> ~<a class="code" href="a00058.html" title="A child thread object that may be joined by parent.">JoinableThread</a>();
<a name="l01578"></a>01578 
<a name="l01584"></a>01584     <span class="keywordtype">void</span> join(<span class="keywordtype">void</span>);
<a name="l01585"></a>01585 
<a name="l01586"></a>01586 <span class="keyword">public</span>:
<a name="l01587"></a>01587 <span class="preprocessor">#ifdef  _MSWINDOWS_</span>
<a name="l01588"></a>01588 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">bool</span> isRunning(<span class="keywordtype">void</span>)
<a name="l01589"></a>01589         {<span class="keywordflow">return</span> (joining != INVALID_HANDLE_VALUE);};
<a name="l01590"></a>01590 <span class="preprocessor">#else</span>
<a name="l01591"></a>01591 <span class="preprocessor"></span>
<a name="l01595"></a><a class="code" href="a00058.html#aed88e32ff6369cc23a9ee00c7ef7485b">01595</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> isRunning(<span class="keywordtype">void</span>)
<a name="l01596"></a>01596         {<span class="keywordflow">return</span> running;};
<a name="l01597"></a>01597 <span class="preprocessor">#endif</span>
<a name="l01598"></a>01598 <span class="preprocessor"></span>
<a name="l01607"></a>01607     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a>(<span class="keywordtype">int</span> priority = 0);
<a name="l01608"></a>01608 
<a name="l01613"></a><a class="code" href="a00058.html#a5cbed341323aebffcf73f5376ca0f14e">01613</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> background(<span class="keywordtype">void</span>)
<a name="l01614"></a>01614         {<a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a>(-1);};
<a name="l01615"></a>01615 };
<a name="l01616"></a>01616 
<a name="l01624"></a><a class="code" href="a00049.html">01624</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00049.html" title="A detached thread object that is stand-alone.">DetachedThread</a> : <span class="keyword">protected</span> <a class="code" href="a00166.html" title="An abstract class for defining classes that operate as a thread.">Thread</a>
<a name="l01625"></a>01625 {
<a name="l01626"></a>01626 <span class="keyword">protected</span>:
<a name="l01631"></a>01631     <a class="code" href="a00049.html" title="A detached thread object that is stand-alone.">DetachedThread</a>(<span class="keywordtype">size_t</span> size = 0);
<a name="l01632"></a>01632 
<a name="l01638"></a>01638     ~<a class="code" href="a00049.html" title="A detached thread object that is stand-alone.">DetachedThread</a>();
<a name="l01639"></a>01639 
<a name="l01648"></a>01648     <span class="keywordtype">void</span> <a class="code" href="a00166.html#a543d27d6cfe3a67f690b3769b5f5883d" title="Exit the thread context.">exit</a>(<span class="keywordtype">void</span>);
<a name="l01649"></a>01649 
<a name="l01650"></a>01650 <span class="keyword">public</span>:
<a name="l01657"></a>01657     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a>(<span class="keywordtype">int</span> priority = 0);
<a name="l01658"></a>01658 };
<a name="l01659"></a>01659     
<a name="l01670"></a><a class="code" href="a00109.html">01670</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a> : <span class="keyword">protected</span> <a class="code" href="a00099.html" title="An index container for maintaining an ordered list of objects.">OrderedIndex</a>, <span class="keyword">protected</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l01671"></a>01671 {
<a name="l01672"></a>01672 <span class="keyword">private</span>:
<a name="l01673"></a>01673     <a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *<a class="code" href="a00102.html" title="Mempager managed type factory for pager pool objects.">pager</a>;
<a name="l01674"></a>01674     <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a> *freelist;
<a name="l01675"></a>01675     <span class="keywordtype">size_t</span> used;
<a name="l01676"></a>01676 
<a name="l01677"></a>01677     <span class="keyword">class </span>__LOCAL member : <span class="keyword">public</span> <a class="code" href="a00100.html" title="A linked object base class for ordered objects.">OrderedObject</a>
<a name="l01678"></a>01678     {
<a name="l01679"></a>01679     <span class="keyword">public</span>:
<a name="l01680"></a>01680         member(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a> *q, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *obj);
<a name="l01681"></a>01681         <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object;
<a name="l01682"></a>01682     };
<a name="l01683"></a>01683 
<a name="l01684"></a>01684     <span class="keyword">friend</span> <span class="keyword">class </span>member;
<a name="l01685"></a>01685 
<a name="l01686"></a>01686 <span class="keyword">protected</span>:
<a name="l01687"></a>01687     <span class="keywordtype">size_t</span> limit;
<a name="l01688"></a>01688 
<a name="l01689"></a>01689 <span class="keyword">public</span>:
<a name="l01697"></a>01697     <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>(<a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *<a class="code" href="a00102.html" title="Mempager managed type factory for pager pool objects.">pager</a> = NULL, <span class="keywordtype">size_t</span> number = 0);
<a name="l01698"></a>01698 
<a name="l01702"></a>01702     ~<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>();
<a name="l01703"></a>01703 
<a name="l01711"></a>01711     <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object);
<a name="l01712"></a>01712 
<a name="l01721"></a>01721     <span class="keywordtype">bool</span> post(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0);
<a name="l01722"></a>01722 
<a name="l01730"></a>01730     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *fifo(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0);
<a name="l01731"></a>01731 
<a name="l01739"></a>01739     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *lifo(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0);
<a name="l01740"></a>01740 
<a name="l01745"></a>01745     <span class="keywordtype">size_t</span> getCount(<span class="keywordtype">void</span>);
<a name="l01746"></a>01746 
<a name="l01753"></a><a class="code" href="a00109.html#a56b85299d970421de9535b5ebdcac5f6">01753</a>     <span class="keyword">static</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>&amp; <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object)
<a name="l01754"></a>01754         {<span class="keywordflow">return</span> <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>.remove(<span class="keywordtype">object</span>);};
<a name="l01755"></a>01755 
<a name="l01763"></a><a class="code" href="a00109.html#aca3840dcdcda6a0d05e8edef00e405e1">01763</a>     <span class="keyword">static</span> <span class="keywordtype">bool</span> post(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>&amp; <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l01764"></a>01764         {<span class="keywordflow">return</span> queue.<a class="code" href="a00109.html#a8ccb5325fa240abc5a60a95c443059ed" title="Post an object into the queue by it&amp;#39;s pointer.">post</a>(<span class="keywordtype">object</span>, timeout);};
<a name="l01765"></a>01765 
<a name="l01772"></a><a class="code" href="a00109.html#ac4830f2fb2b8000a8d06556ebf0334c9">01772</a>     <span class="keyword">static</span> <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *fifo(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>&amp; <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l01773"></a>01773         {<span class="keywordflow">return</span> queue.<a class="code" href="a00109.html#a584797f8acf9c21392107a14a2e9309e" title="Get and remove last object posted to the queue.">fifo</a>(timeout);};
<a name="l01774"></a>01774 
<a name="l01781"></a><a class="code" href="a00109.html#a64eea8a95dff583324a0f45a586e199d">01781</a>     <span class="keyword">static</span> <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *lifo(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>&amp; <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l01782"></a>01782         {<span class="keywordflow">return</span> queue.<a class="code" href="a00109.html#a249082dff3b76ce7371456b36cc9d06f" title="Get and remove first object posted to the queue.">lifo</a>(timeout);};
<a name="l01783"></a>01783 
<a name="l01789"></a><a class="code" href="a00109.html#ae7f69b3d59c9b2b15cd2fd74059862c0">01789</a>     <span class="keyword">static</span> <span class="keywordtype">size_t</span> <a class="code" href="a00099.html#aed2fbd680367ca566e539035e606bc44" title="Count of objects this list manages.">count</a>(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>&amp; <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>)
<a name="l01790"></a>01790         {<span class="keywordflow">return</span> queue.<a class="code" href="a00109.html#a7527e496c3f3ea82b110f302420be120" title="Get number of object points currently in the queue.">getCount</a>();};
<a name="l01791"></a>01791 };
<a name="l01792"></a>01792 
<a name="l01801"></a><a class="code" href="a00155.html">01801</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a> : <span class="keyword">protected</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l01802"></a>01802 {
<a name="l01803"></a>01803 <span class="keyword">private</span>:
<a name="l01804"></a>01804     <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a> *freelist, *usedlist;
<a name="l01805"></a>01805     <a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *<a class="code" href="a00102.html" title="Mempager managed type factory for pager pool objects.">pager</a>;
<a name="l01806"></a>01806     <span class="keywordtype">size_t</span> used;
<a name="l01807"></a>01807 
<a name="l01808"></a>01808     <span class="keyword">class </span>__LOCAL member : <span class="keyword">public</span> <a class="code" href="a00069.html" title="Common base class for all objects that can be formed into a linked list.">LinkedObject</a>
<a name="l01809"></a>01809     {
<a name="l01810"></a>01810     <span class="keyword">public</span>:
<a name="l01811"></a>01811         member(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a> *s, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *obj);
<a name="l01812"></a>01812         <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object;
<a name="l01813"></a>01813     };
<a name="l01814"></a>01814 
<a name="l01815"></a>01815     <span class="keyword">friend</span> <span class="keyword">class </span>member;
<a name="l01816"></a>01816 
<a name="l01817"></a>01817 <span class="keyword">protected</span>:
<a name="l01818"></a>01818     <span class="keywordtype">size_t</span> limit;
<a name="l01819"></a>01819 
<a name="l01820"></a>01820 <span class="keyword">public</span>:
<a name="l01827"></a>01827     <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>(<a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *<a class="code" href="a00102.html" title="Mempager managed type factory for pager pool objects.">pager</a> = NULL, <span class="keywordtype">size_t</span> number = 0);
<a name="l01828"></a>01828 
<a name="l01832"></a>01832     ~<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>();
<a name="l01833"></a>01833 
<a name="l01841"></a>01841     <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object);
<a name="l01842"></a>01842 
<a name="l01851"></a>01851     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">push</a>(<a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0);
<a name="l01852"></a>01852 
<a name="l01860"></a>01860     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">pull</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0);
<a name="l01861"></a>01861 
<a name="l01866"></a>01866     <span class="keywordtype">size_t</span> getCount(<span class="keywordtype">void</span>);
<a name="l01867"></a>01867 
<a name="l01874"></a><a class="code" href="a00155.html#a8525a1092c1dfa31efd711d7dbe56aeb">01874</a>     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>&amp; <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object)
<a name="l01875"></a>01875         {<span class="keywordflow">return</span> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>.remove(<span class="keywordtype">object</span>);};
<a name="l01876"></a>01876 
<a name="l01884"></a><a class="code" href="a00155.html#a6022731e8799fffb574c07db65b03a9f">01884</a>     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">push</a>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>&amp; <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l01885"></a>01885         {<span class="keywordflow">return</span> stack.<a class="code" href="a00155.html#a9b5e008fb6a164368c769dddc5b9d03c" title="Push an object into the stack by it&amp;#39;s pointer.">push</a>(<span class="keywordtype">object</span>, timeout);};
<a name="l01886"></a>01886 
<a name="l01893"></a><a class="code" href="a00155.html#a739b615f83ea098d8f745c408c525063">01893</a>     <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">pull</a>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>&amp; <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l01894"></a>01894         {<span class="keywordflow">return</span> stack.<a class="code" href="a00155.html#a7c98ac66f6d9c440d3fc3a95e6c6ae1a" title="Get and remove last object pushed on the stack.">pull</a>(timeout);};  
<a name="l01895"></a>01895 
<a name="l01901"></a><a class="code" href="a00155.html#acfd9f28bdc3e5c28a841f52cbf753cd0">01901</a>     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">size_t</span> count(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>&amp; <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>)
<a name="l01902"></a>01902         {<span class="keywordflow">return</span> stack.<a class="code" href="a00155.html#a2e8e3e25994d9154f7f5a64f7b00699e" title="Get number of object points currently in the stack.">getCount</a>();};
<a name="l01903"></a>01903 };
<a name="l01904"></a>01904 
<a name="l01914"></a><a class="code" href="a00034.html">01914</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00034.html" title="A thread-safe buffer for serializing and streaming class data.">Buffer</a> : <span class="keyword">protected</span> <a class="code" href="a00040.html" title="The conditional is a common base for other thread synchronizing classes.">Conditional</a>
<a name="l01915"></a>01915 {
<a name="l01916"></a>01916 <span class="keyword">private</span>:
<a name="l01917"></a>01917     <span class="keywordtype">size_t</span> size, objsize;
<a name="l01918"></a>01918     caddr_t buf, head, tail;
<a name="l01919"></a>01919     <span class="keywordtype">unsigned</span> count, limit;
<a name="l01920"></a>01920 
<a name="l01921"></a>01921 <span class="keyword">public</span>:
<a name="l01927"></a>01927     <a class="code" href="a00034.html" title="A thread-safe buffer for serializing and streaming class data.">Buffer</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> count);
<a name="l01928"></a>01928 
<a name="l01932"></a>01932     <span class="keyword">virtual</span> ~<a class="code" href="a00034.html" title="A thread-safe buffer for serializing and streaming class data.">Buffer</a>();
<a name="l01933"></a>01933 
<a name="l01938"></a>01938     <span class="keywordtype">unsigned</span> getSize(<span class="keywordtype">void</span>);
<a name="l01939"></a>01939 
<a name="l01944"></a>01944     <span class="keywordtype">unsigned</span> getCount(<span class="keywordtype">void</span>);
<a name="l01945"></a>01945 
<a name="l01951"></a>01951     <span class="keywordtype">void</span> *<span class="keyword">get</span>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l01952"></a>01952 
<a name="l01958"></a>01958     <span class="keywordtype">void</span> *<span class="keyword">get</span>(void);
<a name="l01959"></a>01959 
<a name="l01965"></a>01965     <span class="keywordtype">void</span> put(<span class="keywordtype">void</span> *data);
<a name="l01966"></a>01966 
<a name="l01973"></a>01973     <span class="keywordtype">bool</span> put(<span class="keywordtype">void</span> *data, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l01974"></a>01974 
<a name="l01981"></a>01981     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l01982"></a>01982 
<a name="l01988"></a>01988     <span class="keywordtype">void</span> <a class="code" href="a00214.html#a8370bd49e635d1f1c3aec9135f497cec" title="Convenence function to access object copy.">copy</a>(<span class="keywordtype">void</span> *data);
<a name="l01989"></a>01989 
<a name="l01996"></a>01996     <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a8370bd49e635d1f1c3aec9135f497cec" title="Convenence function to access object copy.">copy</a>(<span class="keywordtype">void</span> *data, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout);
<a name="l01997"></a>01997 
<a name="l02002"></a>02002     operator bool();
<a name="l02003"></a>02003 
<a name="l02008"></a>02008     <span class="keywordtype">bool</span> operator!();
<a name="l02009"></a>02009 };
<a name="l02010"></a>02010 
<a name="l02019"></a><a class="code" href="a00073.html">02019</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>
<a name="l02020"></a>02020 {
<a name="l02021"></a>02021 <span class="keyword">protected</span>:
<a name="l02022"></a><a class="code" href="a00073.html#a953e9f679a79c0419c07c4dbf3befa9e">02022</a>     <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object; 
<a name="l02027"></a>02027     <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>();
<a name="l02028"></a>02028 
<a name="l02034"></a>02034     <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>(<span class="keyword">const</span> <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a> &amp;<span class="keywordtype">object</span>);
<a name="l02035"></a>02035 
<a name="l02036"></a>02036 <span class="keyword">public</span>:
<a name="l02042"></a>02042     <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>(<a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l02043"></a>02043 
<a name="l02048"></a>02048     ~<a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>();
<a name="l02049"></a>02049 
<a name="l02053"></a>02053     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l02054"></a>02054 
<a name="l02060"></a>02060     <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a> &amp;operator=(<a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l02061"></a>02061 };
<a name="l02062"></a>02062 
<a name="l02072"></a><a class="code" href="a00139.html">02072</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>
<a name="l02073"></a>02073 {
<a name="l02074"></a>02074 <span class="keyword">protected</span>:
<a name="l02075"></a><a class="code" href="a00139.html#a345ad0a116ac888154406359c5dcb127">02075</a>     <a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a> *ptr; 
<a name="l02080"></a>02080     <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>();
<a name="l02081"></a>02081 
<a name="l02087"></a>02087     <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>(<span class="keyword">const</span> <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a> &amp;<span class="keywordtype">object</span>);
<a name="l02088"></a>02088 
<a name="l02089"></a>02089 <span class="keyword">public</span>:
<a name="l02094"></a>02094     <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>(<a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l02095"></a>02095 
<a name="l02101"></a>02101     ~<a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>();
<a name="l02102"></a>02102 
<a name="l02106"></a>02106     <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<span class="keywordtype">void</span>);
<a name="l02107"></a>02107 
<a name="l02112"></a>02112     <a class="code" href="a00140.html" title="Shared singleton object.">SharedObject</a> *<span class="keyword">get</span>(void);
<a name="l02113"></a>02113 
<a name="l02119"></a>02119     <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a> &amp;operator=(<a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>);
<a name="l02120"></a>02120 };
<a name="l02121"></a>02121 
<a name="l02129"></a>02129 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02130"></a><a class="code" href="a00110.html">02130</a> <span class="keyword">class </span><a class="code" href="a00110.html" title="A templated typed class for thread-safe queue of object pointers.">queueof</a> : <span class="keyword">public</span> <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>
<a name="l02131"></a>02131 {
<a name="l02132"></a>02132 <span class="keyword">public</span>:
<a name="l02138"></a><a class="code" href="a00110.html#af4a6b41716e91ff976de2e191f495ec0">02138</a>     <span class="keyword">inline</span> <a class="code" href="a00110.html#af4a6b41716e91ff976de2e191f495ec0" title="Create templated queue of typed objects.">queueof</a>(<a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *memory, <span class="keywordtype">size_t</span> size = 0) : <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a>(memory, size) {};
<a name="l02139"></a>02139 
<a name="l02147"></a><a class="code" href="a00110.html#a2c9dd405669ccc7aced1567caa3e3934">02147</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(T *object)
<a name="l02148"></a>02148         {<span class="keywordflow">return</span> <a class="code" href="a00214.html#a284595fb28be69136211845567e6eeec" title="Convenience function to remove an object from a stack.">queue::remove</a>(<span class="keywordtype">object</span>);};    
<a name="l02149"></a>02149 
<a name="l02158"></a><a class="code" href="a00110.html#aacfcdd365ecd62ff650357ddd34a5d59">02158</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> post(T *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l02159"></a>02159         {<span class="keywordflow">return</span> queue::post(<span class="keywordtype">object</span>);};
<a name="l02160"></a>02160 
<a name="l02168"></a><a class="code" href="a00110.html#a239c9b507998743083d3e021c87f7b71">02168</a>     <span class="keyword">inline</span> T *fifo(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l02169"></a>02169         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T *<span class="keyword">&gt;</span>(queue::fifo(timeout));};
<a name="l02170"></a>02170 
<a name="l02178"></a><a class="code" href="a00110.html#ae5b5d50569b9c7ee35d212761a497035">02178</a>     <span class="keyword">inline</span> T *lifo(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l02179"></a>02179         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T *<span class="keyword">&gt;</span>(queue::lifo(timeout));};
<a name="l02180"></a>02180 };
<a name="l02181"></a>02181 
<a name="l02189"></a>02189 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02190"></a><a class="code" href="a00156.html">02190</a> <span class="keyword">class </span><a class="code" href="a00156.html" title="A templated typed class for thread-safe stack of object pointers.">stackof</a> : <span class="keyword">public</span> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>
<a name="l02191"></a>02191 {
<a name="l02192"></a>02192 <span class="keyword">public</span>:
<a name="l02198"></a><a class="code" href="a00156.html#ad3ef765e9c5411563c872acc23ab3a01">02198</a>     <span class="keyword">inline</span> <a class="code" href="a00156.html#ad3ef765e9c5411563c872acc23ab3a01" title="Create templated stack of typed objects.">stackof</a>(<a class="code" href="a00081.html" title="A managed private heap for small allocations.">mempager</a> *memory, <span class="keywordtype">size_t</span> size = 0) : <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>(memory, size) {};
<a name="l02199"></a>02199 
<a name="l02207"></a><a class="code" href="a00156.html#a68051f37ba7a9aa6ce4642df433f96e2">02207</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(T *object)
<a name="l02208"></a>02208         {<span class="keywordflow">return</span> <a class="code" href="a00214.html#a284595fb28be69136211845567e6eeec" title="Convenience function to remove an object from a stack.">stack::remove</a>(<span class="keywordtype">object</span>);};    
<a name="l02209"></a>02209 
<a name="l02218"></a><a class="code" href="a00156.html#aade8e7c4ac6d569de7e250fe6e36c67c">02218</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">push</a>(T *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l02219"></a>02219         {<span class="keywordflow">return</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">stack::push</a>(<span class="keywordtype">object</span>);};
<a name="l02220"></a>02220 
<a name="l02228"></a><a class="code" href="a00156.html#af4026ccd808a0140f0d0597ce0598e30">02228</a>     <span class="keyword">inline</span> T *<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">pull</a>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = 0)
<a name="l02229"></a>02229         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T *<span class="keyword">&gt;</span>(<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">stack::pull</a>(timeout));};
<a name="l02230"></a>02230 };
<a name="l02231"></a>02231 
<a name="l02243"></a>02243 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02244"></a><a class="code" href="a00035.html">02244</a> <span class="keyword">class </span><a class="code" href="a00035.html" title="A templated typed class for buffering of objects.">bufferof</a> : <span class="keyword">public</span> <a class="code" href="a00034.html" title="A thread-safe buffer for serializing and streaming class data.">Buffer</a>
<a name="l02245"></a>02245 {
<a name="l02246"></a>02246 <span class="keyword">public</span>:
<a name="l02251"></a><a class="code" href="a00035.html#a78a7a6681f37c11978ea1ea527da5667">02251</a>     <span class="keyword">inline</span> <a class="code" href="a00035.html" title="A templated typed class for buffering of objects.">bufferof</a>(<span class="keywordtype">unsigned</span> count) :
<a name="l02252"></a>02252         <a class="code" href="a00034.html" title="A thread-safe buffer for serializing and streaming class data.">Buffer</a>(sizeof(T), count) {};
<a name="l02253"></a>02253 
<a name="l02259"></a><a class="code" href="a00035.html#ac722ebc172fc443a6717ca7e63d97141">02259</a>     <span class="keyword">inline</span> T *<span class="keyword">get</span>(void)
<a name="l02260"></a>02260         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(<span class="keyword">get</span>());};
<a name="l02261"></a>02261 
<a name="l02267"></a><a class="code" href="a00035.html#a4f383a2e0e92b08983f778ee417e7086">02267</a>     <span class="keyword">inline</span> T *<span class="keyword">get</span>(<a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l02268"></a>02268         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(<span class="keyword">get</span>(timeout));};
<a name="l02269"></a>02269 
<a name="l02275"></a><a class="code" href="a00035.html#aec6c2d9df4a15c22150bc91f1f51caf0">02275</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> put(T *<span class="keywordtype">object</span>)
<a name="l02276"></a>02276         {<a class="code" href="a00035.html#aec6c2d9df4a15c22150bc91f1f51caf0" title="Put (copy) a typed object into the buffer.">put</a>(<span class="keywordtype">object</span>);};
<a name="l02277"></a>02277 
<a name="l02284"></a><a class="code" href="a00035.html#a6f57116b2e04b0b27848bc054d8bdb1e">02284</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> put(T *<span class="keywordtype">object</span>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l02285"></a>02285         {<span class="keywordflow">return</span> <a class="code" href="a00035.html#a6f57116b2e04b0b27848bc054d8bdb1e" title="Put (copy) an object into the buffer.">put</a>(<span class="keywordtype">object</span>, timeout);};
<a name="l02286"></a>02286 
<a name="l02292"></a><a class="code" href="a00035.html#aa7203da87e2fe72118af980d94eb013e">02292</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a8370bd49e635d1f1c3aec9135f497cec" title="Convenence function to access object copy.">copy</a>(T *<span class="keywordtype">object</span>)
<a name="l02293"></a>02293         {<a class="code" href="a00035.html#aa7203da87e2fe72118af980d94eb013e" title="Copy the next typed object from the buffer.">copy</a>(<span class="keywordtype">object</span>);};
<a name="l02294"></a>02294 
<a name="l02301"></a><a class="code" href="a00035.html#ad071de1bd4e584adccea4fe4361ee0bf">02301</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> <span class="keyword">get</span>(T *object, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout)
<a name="l02302"></a>02302         {<span class="keywordflow">return</span> <a class="code" href="a00214.html#a8370bd49e635d1f1c3aec9135f497cec" title="Convenence function to access object copy.">copy</a>(<span class="keywordtype">object</span>, timeout);};
<a name="l02303"></a>02303 };
<a name="l02304"></a>02304 
<a name="l02312"></a>02312 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02313"></a><a class="code" href="a00138.html">02313</a> <span class="keyword">class </span><a class="code" href="a00138.html" title="Templated shared pointer for singleton shared objects of specific type.">shared_pointer</a> : <span class="keyword">public</span> <a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a>
<a name="l02314"></a>02314 {
<a name="l02315"></a>02315 <span class="keyword">public</span>:
<a name="l02319"></a><a class="code" href="a00138.html#a0e20901293c53ce070a8a73c8bc9a97e">02319</a>     <span class="keyword">inline</span> <a class="code" href="a00138.html#a0e20901293c53ce070a8a73c8bc9a97e" title="Created shared locking for typed singleton pointer.">shared_pointer</a>() : <a class="code" href="a00141.html" title="The shared pointer is used to manage a singleton instance of shared object.">SharedPointer</a>() {};
<a name="l02320"></a>02320 
<a name="l02328"></a><a class="code" href="a00138.html#a61ff23d5ebe77aae4cb275a8953c9b5e">02328</a>     <span class="keyword">inline</span> <span class="keyword">const</span> T *dup(<span class="keywordtype">void</span>)
<a name="l02329"></a>02329         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keyword">const </span>T*<span class="keyword">&gt;</span>(<a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">SharedPointer::share</a>());};
<a name="l02330"></a>02330 
<a name="l02337"></a><a class="code" href="a00138.html#a358c1bcfde7cebafe247dcc3bdae6f50">02337</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> replace(T *<span class="keywordtype">object</span>)
<a name="l02338"></a>02338         {SharedPointer::replace(<span class="keywordtype">object</span>);};
<a name="l02339"></a>02339     
<a name="l02344"></a><a class="code" href="a00138.html#a4d22e05dc137c36f9f4462b866aa63e5">02344</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(T *<span class="keywordtype">object</span>)
<a name="l02345"></a>02345         {replace(<span class="keywordtype">object</span>);};
<a name="l02346"></a>02346 
<a name="l02351"></a><a class="code" href="a00138.html#a8cb97caf54d052dbc4c2a7b64537d60f">02351</a>     <span class="keyword">inline</span> T *operator*()
<a name="l02352"></a>02352         {<span class="keywordflow">return</span> dup();};
<a name="l02353"></a>02353 };  
<a name="l02354"></a>02354 
<a name="l02362"></a>02362 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02363"></a><a class="code" href="a00072.html">02363</a> <span class="keyword">class </span><a class="code" href="a00072.html" title="Templated locked pointer for referencing locked objects of specific type.">locked_pointer</a> : <span class="keyword">public</span> <a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a>
<a name="l02364"></a>02364 {
<a name="l02365"></a>02365 <span class="keyword">public</span>:
<a name="l02369"></a><a class="code" href="a00072.html#ac8cdb5118016602c81c9aa3598f6a4fd">02369</a>     <span class="keyword">inline</span> <a class="code" href="a00072.html#ac8cdb5118016602c81c9aa3598f6a4fd" title="Create an instance of a typed locked pointer.">locked_pointer</a>() : <a class="code" href="a00074.html" title="An object pointer that uses mutex to assure thread-safe singleton use.">LockedPointer</a>() {};
<a name="l02370"></a>02370 
<a name="l02376"></a><a class="code" href="a00072.html#a25f62d2b2bbdbd930cbe38f4177f0f80">02376</a>     <span class="keyword">inline</span> T* dup(<span class="keywordtype">void</span>)
<a name="l02377"></a>02377         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T *<span class="keyword">&gt;</span>(LockedPointer::dup());};
<a name="l02378"></a>02378 
<a name="l02383"></a><a class="code" href="a00072.html#ab62d888966c6062f0d5b8784fe377a6d">02383</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> replace(T *<span class="keywordtype">object</span>)
<a name="l02384"></a>02384         {LockedPointer::replace(<span class="keywordtype">object</span>);};
<a name="l02385"></a>02385 
<a name="l02390"></a><a class="code" href="a00072.html#a422577194a73c204ed44fbb6686dd1b0">02390</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> operator=(T *<span class="keywordtype">object</span>)
<a name="l02391"></a>02391         {replace(<span class="keywordtype">object</span>);};
<a name="l02392"></a>02392 
<a name="l02398"></a><a class="code" href="a00072.html#a54a2d6759404bbc31e1d339aec3be4fb">02398</a>     <span class="keyword">inline</span> T *operator*()
<a name="l02399"></a>02399         {<span class="keywordflow">return</span> dup();};
<a name="l02400"></a>02400 };
<a name="l02401"></a>02401 
<a name="l02407"></a>02407 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02408"></a><a class="code" href="a00071.html">02408</a> <span class="keyword">class </span><a class="code" href="a00071.html" title="A templated smart pointer instance for lock protected objects.">locked_instance</a> : <span class="keyword">public</span> <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>
<a name="l02409"></a>02409 {
<a name="l02410"></a>02410 <span class="keyword">public</span>:
<a name="l02414"></a><a class="code" href="a00071.html#a59f2ba6b3f8307ce20c626ef55d23f5c">02414</a>     <span class="keyword">inline</span> <a class="code" href="a00071.html#a59f2ba6b3f8307ce20c626ef55d23f5c" title="Construct empty locked instance of typed object.">locked_instance</a>() : <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>() {};
<a name="l02415"></a>02415 
<a name="l02420"></a><a class="code" href="a00071.html#a539959589257b75c4f9c66d76549d9ca">02420</a>     <span class="keyword">inline</span> <a class="code" href="a00071.html#a539959589257b75c4f9c66d76549d9ca" title="Construct locked instance of typed object from matching locked_pointer.">locked_instance</a>(<a class="code" href="a00072.html" title="Templated locked pointer for referencing locked objects of specific type.">locked_pointer&lt;T&gt;</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>) : <a class="code" href="a00073.html" title="Auto-pointer support class for locked objects.">locked_release</a>(pointer) {};
<a name="l02421"></a>02421 
<a name="l02426"></a><a class="code" href="a00071.html#a1615cd83b37fa2f00f0e12a0260c26e6">02426</a>     <span class="keyword">inline</span> T&amp; operator*()<span class="keyword"> const</span>
<a name="l02427"></a>02427 <span class="keyword">        </span>{<span class="keywordflow">return</span> *(<span class="keyword">static_cast&lt;</span>T *<span class="keyword">&gt;</span>(object));};
<a name="l02428"></a>02428 
<a name="l02433"></a><a class="code" href="a00071.html#a52e1fdfb80ce55c7ebad619febc97725">02433</a>     <span class="keyword">inline</span> T* operator-&gt;()<span class="keyword"> const</span>
<a name="l02434"></a>02434 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(object);};
<a name="l02435"></a>02435 
<a name="l02440"></a><a class="code" href="a00071.html#a81e0de6e2d5ea39f741eb8caf027adf7">02440</a>     <span class="keyword">inline</span> T* <span class="keyword">get</span>(void) <span class="keyword">const</span>
<a name="l02441"></a>02441         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(object);};
<a name="l02442"></a>02442 };
<a name="l02443"></a>02443 
<a name="l02449"></a>02449 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l02450"></a><a class="code" href="a00136.html">02450</a> <span class="keyword">class </span><a class="code" href="a00136.html" title="A templated smart pointer instance for shared singleton typed objects.">shared_instance</a> : <span class="keyword">public</span> <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>
<a name="l02451"></a>02451 {
<a name="l02452"></a>02452 <span class="keyword">public</span>:
<a name="l02456"></a><a class="code" href="a00136.html#af739c8b7c2f2ec8d4faf89a4b43fff14">02456</a>     <span class="keyword">inline</span> <a class="code" href="a00136.html#af739c8b7c2f2ec8d4faf89a4b43fff14" title="Construct empty instance to reference shared typed singleton.">shared_instance</a>() : <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>() {};
<a name="l02457"></a>02457 
<a name="l02463"></a><a class="code" href="a00136.html#a0a69629720862a090339ce513d20d6e7">02463</a>     <span class="keyword">inline</span> <a class="code" href="a00136.html#a0a69629720862a090339ce513d20d6e7" title="Construct shared access instance of shared typed singleton from matching shared_pointer...">shared_instance</a>(<a class="code" href="a00138.html" title="Templated shared pointer for singleton shared objects of specific type.">shared_pointer&lt;T&gt;</a> &amp;<a class="code" href="a00015.html" title="Typed smart pointer class.">pointer</a>) : <a class="code" href="a00139.html" title="Auto-pointer support class for shared singleton objects.">shared_release</a>(pointer) {};
<a name="l02464"></a>02464 
<a name="l02468"></a><a class="code" href="a00136.html#a96174bb82b926abf27796d841ac17205">02468</a>     <span class="keyword">inline</span> <span class="keyword">const</span> T&amp; operator*()<span class="keyword"> const</span>
<a name="l02469"></a>02469 <span class="keyword">        </span>{<span class="keywordflow">return</span> *(<span class="keyword">static_cast&lt;</span><span class="keyword">const </span>T *<span class="keyword">&gt;</span>(ptr-&gt;pointer));};
<a name="l02470"></a>02470 
<a name="l02475"></a><a class="code" href="a00136.html#acdc8b6e6f6255886020870aae8bf64ca">02475</a>     <span class="keyword">inline</span> <span class="keyword">const</span> T* operator-&gt;()<span class="keyword"> const</span>
<a name="l02476"></a>02476 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keyword">const </span>T*<span class="keyword">&gt;</span>(ptr-&gt;pointer);};
<a name="l02477"></a>02477 
<a name="l02482"></a><a class="code" href="a00136.html#adad60a0b5e4416a1f41f074d71918c4a">02482</a>     <span class="keyword">inline</span> <span class="keyword">const</span> T* <span class="keyword">get</span>(void) <span class="keyword">const</span>
<a name="l02483"></a>02483         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keyword">const </span>T*<span class="keyword">&gt;</span>(ptr-&gt;pointer);};
<a name="l02484"></a>02484 };
<a name="l02485"></a>02485 
<a name="l02492"></a>02492 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l02493"></a><a class="code" href="a00088.html">02493</a> <span class="keyword">class </span><a class="code" href="a00088.html" title="Typed smart locked pointer class.">mutex_pointer</a> : <span class="keyword">public</span> <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>
<a name="l02494"></a>02494 {
<a name="l02495"></a>02495 <span class="keyword">public</span>:
<a name="l02499"></a><a class="code" href="a00088.html#ad327e21ffab9132b4bb747abda026e52">02499</a>     <span class="keyword">inline</span> <a class="code" href="a00088.html#ad327e21ffab9132b4bb747abda026e52" title="Create a pointer with no reference.">mutex_pointer</a>() : <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>() {};
<a name="l02500"></a>02500 
<a name="l02505"></a><a class="code" href="a00088.html#a1f9c75ba861eeb3f6037e57037eeb53a">02505</a>     <span class="keyword">inline</span> <a class="code" href="a00088.html#a1f9c75ba861eeb3f6037e57037eeb53a" title="Create a pointer with a reference to a heap object.">mutex_pointer</a>(T* <span class="keywordtype">object</span>) : <a class="code" href="a00030.html" title="A mutex locked object smart pointer helper class.">auto_protect</a>(object) {};
<a name="l02506"></a>02506 
<a name="l02511"></a><a class="code" href="a00088.html#a056d29e00d642997a1aeb56edd8aa883">02511</a>     <span class="keyword">inline</span> T&amp; operator*()<span class="keyword"> const</span>
<a name="l02512"></a>02512 <span class="keyword">        </span>{<span class="keywordflow">return</span> *(<span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(auto_protect::object));};
<a name="l02513"></a>02513 
<a name="l02518"></a><a class="code" href="a00088.html#a02268f8f3c95d94c5656b1e2f46f1140">02518</a>     <span class="keyword">inline</span> T* operator-&gt;()<span class="keyword"> const</span>
<a name="l02519"></a>02519 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(auto_protect::object);};
<a name="l02520"></a>02520 
<a name="l02525"></a><a class="code" href="a00088.html#a0df751dd82fdeade689596e925bfd8e7">02525</a>     <span class="keyword">inline</span> T* <span class="keyword">get</span>(void) <span class="keyword">const</span>
<a name="l02526"></a>02526         {<span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(auto_protect::object);};
<a name="l02527"></a>02527 };
<a name="l02528"></a>02528 
<a name="l02534"></a><a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48">02534</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a>(<a class="code" href="a00058.html" title="A child thread object that may be joined by parent.">JoinableThread</a> *thread, <span class="keywordtype">int</span> priority = 0)
<a name="l02535"></a>02535     {thread-&gt;<a class="code" href="a00058.html#a6365bb6187c9e605aa1e38ed21fdb387" title="Start execution of child context.">start</a>(priority);}
<a name="l02536"></a>02536 
<a name="l02542"></a><a class="code" href="a00214.html#a436bda4e7f1c9f6d4fab744e1d5f623d">02542</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a>(<a class="code" href="a00049.html" title="A detached thread object that is stand-alone.">DetachedThread</a> *thread, <span class="keywordtype">int</span> priority = 0)
<a name="l02543"></a>02543     {thread-&gt;<a class="code" href="a00049.html#a59ec418547f7afc7c332c2cf25696297" title="Start execution of detached context.">start</a>(priority);}
<a name="l02544"></a>02544 
<a name="l02548"></a><a class="code" href="a00214.html#a162095e89e159ae6c5b2e393f1ab0d9e">02548</a> <span class="keyword">typedef</span> <a class="code" href="a00042.html" title="An optimized and convertable shared lock.">ConditionalLock</a> <a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a>;
<a name="l02549"></a>02549 
<a name="l02553"></a><a class="code" href="a00214.html#a4dba2c7011bd293efa067298b792c856">02553</a> <span class="keyword">typedef</span> <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">ConditionalAccess</a> <a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">accesslock_t</a>;
<a name="l02554"></a>02554 
<a name="l02558"></a><a class="code" href="a00214.html#a6cd8b424e576c988a4d8af19510fa261">02558</a> <span class="keyword">typedef</span> <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">TimedEvent</a> <a class="code" href="a00168.html" title="Event notification to manage scheduled realtime threads.">timedevent_t</a>;
<a name="l02559"></a>02559 
<a name="l02563"></a><a class="code" href="a00214.html#acd902aea7dfbb5ee63938d71fb32016a">02563</a> <span class="keyword">typedef</span> <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a> <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex_t</a>;
<a name="l02564"></a>02564 
<a name="l02569"></a><a class="code" href="a00214.html#aa44b45d6be929c62dfec7abf182b1500">02569</a> <span class="keyword">typedef</span> <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a> <a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">Mutex</a>;
<a name="l02570"></a>02570 
<a name="l02574"></a><a class="code" href="a00214.html#ab4852a3bcef9e36c1e6ded4e6393579a">02574</a> <span class="keyword">typedef</span> <a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock</a> <a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock_t</a>;
<a name="l02575"></a>02575 
<a name="l02579"></a><a class="code" href="a00214.html#ab5bc49b731794e82329972cbaa7201b2">02579</a> <span class="keyword">typedef</span> <a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock</a> <a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock_t</a>;
<a name="l02580"></a>02580 
<a name="l02584"></a><a class="code" href="a00214.html#a7e4ed1f363077c0500a3c535d9e65505">02584</a> <span class="keyword">typedef</span> <a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a> <a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore_t</a>;
<a name="l02585"></a>02585 
<a name="l02589"></a><a class="code" href="a00214.html#abe594a4773fadb944829bf49f2923b32">02589</a> <span class="keyword">typedef</span> <a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a> <a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier_t</a>;
<a name="l02590"></a>02590 
<a name="l02594"></a><a class="code" href="a00214.html#a6f2ceb9e4fddf29387cb639eeb790198">02594</a> <span class="keyword">typedef</span> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a> <a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack_t</a>;
<a name="l02595"></a>02595 
<a name="l02599"></a><a class="code" href="a00214.html#a977375bd8010286297245e8afd94387f">02599</a> <span class="keyword">typedef</span> <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">queue</a> <a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">fifo_t</a>;
<a name="l02600"></a>02600 
<a name="l02605"></a><a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5">02605</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier_t</a> &amp;<a class="code" href="a00032.html" title="A portable implimentation of &amp;quot;barrier&amp;quot; thread sychronization.">barrier</a>)
<a name="l02606"></a>02606     {barrier.<a class="code" href="a00032.html#a0e861c5a19bd462e79cc1edac835506c" title="Wait at the barrier until the count of threads waiting is reached.">wait</a>();}
<a name="l02607"></a>02607 
<a name="l02613"></a><a class="code" href="a00214.html#a9a03cfa0cc7feea8d0b3c40dff579c94">02613</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a2f0fa9cbff7791a5006406a3066d4dc5" title="Convenience function to wait on a barrier.">wait</a>(<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore_t</a> &amp;<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l02614"></a>02614     {semaphore.<a class="code" href="a00132.html#a56ec938f1b92ac4395e63489e7b1103c" title="Wait until the semphore usage count is less than the thread limit.">wait</a>(timeout);}
<a name="l02615"></a>02615 
<a name="l02620"></a><a class="code" href="a00214.html#a1309e595528dfc88c7600c18ec070062">02620</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore_t</a> &amp;<a class="code" href="a00132.html" title="A portable counting semaphore class.">semaphore</a>)
<a name="l02621"></a>02621     {semaphore.<a class="code" href="a00132.html#a884c8c2b1a5cf2df607cffb668b447fb" title="Release the semaphore after waiting for it.">release</a>();}
<a name="l02622"></a>02622 
<a name="l02627"></a><a class="code" href="a00214.html#a4ad966e53a1365b019692202af34e353">02627</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a4ad966e53a1365b019692202af34e353" title="Convenience function to acquire a mutex.">acquire</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex_t</a> &amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>)
<a name="l02628"></a>02628     {mutex.<a class="code" href="a00086.html#abd0edc0ca39bbdbb5e9e5e44981f1d1a" title="Acquire mutex lock.">lock</a>();}
<a name="l02629"></a>02629 
<a name="l02634"></a><a class="code" href="a00214.html#a9dbb5718ac41e634f6ee834d670cbf15">02634</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex_t</a> &amp;<a class="code" href="a00086.html" title="Generic non-recursive exclusive lock class.">mutex</a>)
<a name="l02635"></a>02635     {mutex.<a class="code" href="a00086.html#aeb2971d84f8f9372b58f5f8cd329c7c6" title="Release acquired lock.">release</a>();}
<a name="l02636"></a>02636 
<a name="l02641"></a><a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc">02641</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc" title="Convenience function to exclusively schedule conditional access.">modify</a>(<a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">accesslock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02642"></a>02642     {lock.<a class="code" href="a00041.html#a808998cdbbf86426abd0091947d14516" title="Exclusive mode write thread scheduling.">modify</a>();}
<a name="l02643"></a>02643 
<a name="l02648"></a><a class="code" href="a00214.html#a7234a724934e8756876c755084c53642">02648</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&amp;#39;s protocol.">access</a>(<a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">accesslock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02649"></a>02649     {lock.<a class="code" href="a00041.html#a46436dd5ff53ca22b8d504409ecb7d87" title="Access mode shared thread scheduling.">access</a>();}
<a name="l02650"></a>02650 
<a name="l02655"></a><a class="code" href="a00214.html#a70b7605daf7a471c105832a2fcc91ff6">02655</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">accesslock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02656"></a>02656     {lock.<a class="code" href="a00041.html#a51094b41fa291d5ad27770c84babed10" title="Release access mode read scheduling.">release</a>();}
<a name="l02657"></a>02657 
<a name="l02663"></a><a class="code" href="a00214.html#a3209b5b6b32540b77d86a74f8eee58a9">02663</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a3209b5b6b32540b77d86a74f8eee58a9" title="Convenience function to commit an exclusive access lock.">commit</a>(<a class="code" href="a00041.html" title="The conditional rw seperates scheduling for optizming behavior or rw locks.">accesslock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02664"></a>02664     {lock.<a class="code" href="a00041.html#aae4efc6f4ca22b3871638cef56db38a7" title="Complete exclusive mode write scheduling.">commit</a>();}
<a name="l02665"></a>02665 
<a name="l02670"></a><a class="code" href="a00214.html#ae2eb7f2e9a826ec2cafa18b072e080ee">02670</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#aeaed52a287086b5ba39effca9e7b037d" title="Convenience function to exclusive lock shared object through it&amp;#39;s protocol.">exclusive</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02671"></a>02671     {lock.<a class="code" href="a00042.html#a9daadc3d99bd3cd6c8467e33e0b1496e" title="Convert read lock into exclusive (write/modify) access.">exclusive</a>();}
<a name="l02672"></a>02672 
<a name="l02677"></a><a class="code" href="a00214.html#a14fdb52b75a1d4336c9b962ba70aba75">02677</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">share</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02678"></a>02678     {lock.<a class="code" href="a00042.html#a5ddcb0a7691af3c157bf5d4de3e3a5b4" title="Return an exclusive access lock back to share mode.">share</a>();}
<a name="l02679"></a>02679 
<a name="l02684"></a><a class="code" href="a00214.html#a12570b6a5b5e22baa931dfcf1880575d">02684</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#afbca012752e5f641c92e06645f0c06dc" title="Convenience function to exclusively schedule conditional access.">modify</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02685"></a>02685     {lock.<a class="code" href="a00042.html#a01d9be1b777988d54fc35327e049c47c" title="Acquire write (exclusive modify) lock.">modify</a>();}
<a name="l02686"></a>02686 
<a name="l02692"></a><a class="code" href="a00214.html#a50c03aabe0615bf7c278d57d78fced85">02692</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a3209b5b6b32540b77d86a74f8eee58a9" title="Convenience function to commit an exclusive access lock.">commit</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02693"></a>02693     {lock.<a class="code" href="a00042.html#ad3f81d8a9b81fd9de6d11bb566326eae" title="Commit changes / release a modify lock.">commit</a>();}
<a name="l02694"></a>02694 
<a name="l02699"></a><a class="code" href="a00214.html#a60d71d32eb6178eba56d0af5c3e763e9">02699</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&amp;#39;s protocol.">access</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02700"></a>02700     {lock.<a class="code" href="a00042.html#ae374d4deed36bdc27706350bd957bb06" title="Acquire access (shared read) lock.">access</a>();}
<a name="l02701"></a>02701 
<a name="l02706"></a><a class="code" href="a00214.html#a803685bd0fb1485f48e90c3bda34785f">02706</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00042.html" title="An optimized and convertable shared lock.">condlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02707"></a>02707     {lock.<a class="code" href="a00042.html#aae9e8cd11043e975dcc91eb0378b3c8d" title="Release a shared lock.">release</a>();}
<a name="l02708"></a>02708 
<a name="l02714"></a><a class="code" href="a00214.html#a1617d41148acbdce311148585c8cd3c3">02714</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#aeaed52a287086b5ba39effca9e7b037d" title="Convenience function to exclusive lock shared object through it&amp;#39;s protocol.">exclusive</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l02715"></a>02715     {<span class="keywordflow">return</span> lock.<a class="code" href="a00115.html#aa2c85cefd6ae9b8a3fbc97b74d78f4e4" title="Request modify (write) access through the lock.">modify</a>(timeout);}
<a name="l02716"></a>02716 
<a name="l02722"></a><a class="code" href="a00214.html#a439333d599b1359a968a66826a5b4aa0">02722</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="a00214.html#a5ece1dc7970bcebf162c214d349292b2" title="Convenience function to restore shared locking for object through it&amp;#39;s protocol...">share</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l02723"></a>02723     {<span class="keywordflow">return</span> lock.<a class="code" href="a00115.html#a7960c0e198223a7c613bbdc5cbd4805f" title="Request shared (read) access through the lock.">access</a>(timeout);}
<a name="l02724"></a>02724 
<a name="l02729"></a><a class="code" href="a00214.html#a644ccd5401b431d846a3bb6a573fc17f">02729</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00115.html" title="A generic and portable implimentation of Read/Write locking.">rwlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02730"></a>02730     {lock.<a class="code" href="a00115.html#a58854ccc82cc34c0203a722fb7212a02" title="Release an arbitrary object that has been protected by a rwlock.">release</a>();}
<a name="l02731"></a>02731 
<a name="l02736"></a><a class="code" href="a00214.html#ad9b6d3c149c88c9ccd974ea52d71aee9">02736</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>(<a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02737"></a>02737     {lock.<a class="code" href="a00114.html#af146687ce6b60adf7e8f4a658c808df4" title="Acquire or increase locking.">lock</a>();}
<a name="l02738"></a>02738 
<a name="l02743"></a><a class="code" href="a00214.html#a5f8b2156fb5370b02142706ed0f886ce">02743</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ab7bef2898e731474a9c3dfa805a6f56d" title="Convenience function to unlock shared object through it&amp;#39;s protocol.">release</a>(<a class="code" href="a00114.html" title="Portable recursive exclusive lock.">rexlock_t</a> &amp;<a class="code" href="a00214.html#a72818707e51af1a21b83b8ea39b95daa" title="Convenience function to exclusively lock an object through it&amp;#39;s protocol.">lock</a>)
<a name="l02744"></a>02744     {lock.<a class="code" href="a00114.html#a16a8e649b1f83c3ebc1d17afb55c9c4a" title="Release or decrease locking.">release</a>();}
<a name="l02745"></a>02745 
<a name="l02751"></a><a class="code" href="a00214.html#ab446852e83e4377964e674e5a1bee082">02751</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">push</a>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack_t</a> &amp;<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>)
<a name="l02752"></a>02752     {stack.<a class="code" href="a00155.html#a9b5e008fb6a164368c769dddc5b9d03c" title="Push an object into the stack by it&amp;#39;s pointer.">push</a>(<span class="keywordtype">object</span>);}
<a name="l02753"></a>02753 
<a name="l02760"></a><a class="code" href="a00214.html#a211aa5e16c312bf683d7dc1fe3fc4379">02760</a> <span class="keyword">inline</span> <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">pull</a>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack_t</a> &amp;<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l02761"></a>02761     {<span class="keywordflow">return</span> stack.<a class="code" href="a00155.html#a7c98ac66f6d9c440d3fc3a95e6c6ae1a" title="Get and remove last object pushed on the stack.">pull</a>(timeout);}
<a name="l02762"></a>02762 
<a name="l02768"></a><a class="code" href="a00214.html#a284595fb28be69136211845567e6eeec">02768</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <span class="keyword">remove</span>(<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack_t</a> &amp;<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object)
<a name="l02769"></a>02769     {<a class="code" href="a00155.html" title="Manage a thread-safe stack of objects through reference pointers.">stack</a>.remove(<span class="keywordtype">object</span>);}
<a name="l02770"></a>02770 
<a name="l02776"></a><a class="code" href="a00214.html#a76919e8ecf147f1860f85f211a4a0f1a">02776</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00214.html#ad3c146b0a18955ca36ae65ef8edacaa0" title="Push a linked object onto a stack of linked objects.">push</a>(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">fifo_t</a> &amp;fifo, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<span class="keywordtype">object</span>)
<a name="l02777"></a>02777     {fifo.<a class="code" href="a00109.html#a8ccb5325fa240abc5a60a95c443059ed" title="Post an object into the queue by it&amp;#39;s pointer.">post</a>(<span class="keywordtype">object</span>);}
<a name="l02778"></a>02778 
<a name="l02785"></a><a class="code" href="a00214.html#a30ede98ed10a116709158a7e2fb8d7be">02785</a> <span class="keyword">inline</span> <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *<a class="code" href="a00214.html#ac33cb2f400b01365f1ebff8d7fa62c9a" title="Pop a linked object from a stack of linked objects.">pull</a>(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">fifo_t</a> &amp;fifo, <a class="code" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c" title="Typedef for millisecond timer values.">timeout_t</a> timeout = Timer::inf)
<a name="l02786"></a>02786     {<span class="keywordflow">return</span> fifo.<a class="code" href="a00109.html#a584797f8acf9c21392107a14a2e9309e" title="Get and remove last object posted to the queue.">fifo</a>(timeout);}
<a name="l02787"></a>02787 
<a name="l02793"></a><a class="code" href="a00214.html#ab706487a8728a23560650f7c20c3a6e8">02793</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <span class="keyword">remove</span>(<a class="code" href="a00109.html" title="Manage a thread-safe queue of objects through reference pointers.">fifo_t</a> &amp;fifo, <a class="code" href="a00093.html" title="A common base class for all managed objects.">Object</a> *object)
<a name="l02794"></a>02794     {fifo.remove(<span class="keywordtype">object</span>);}
<a name="l02795"></a>02795 
<a name="l02796"></a>02796 END_NAMESPACE
<a name="l02797"></a>02797 
<a name="l02798"></a>02798 <span class="preprocessor">#define ENTER_EXCLUSIVE \</span>
<a name="l02799"></a>02799 <span class="preprocessor">    do { static pthread_mutex_t __sync__ = PTHREAD_MUTEX_INITIALIZER; \</span>
<a name="l02800"></a>02800 <span class="preprocessor">        pthread_mutex_lock(&amp;__sync__);</span>
<a name="l02801"></a>02801 <span class="preprocessor"></span>
<a name="l02802"></a>02802 <span class="preprocessor">#define LEAVE_EXCLUSIVE \</span>
<a name="l02803"></a>02803 <span class="preprocessor">    pthread_mutex_unlock(&amp;__sync__);} while(0);</span>
<a name="l02804"></a>02804 <span class="preprocessor"></span>
<a name="l02805"></a>02805 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:01 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>