File: group__rtdmsync.html

package info (click to toggle)
xenomai 2.5.4-3squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 36,140 kB
  • ctags: 35,509
  • sloc: ansic: 109,084; sh: 11,745; makefile: 2,205; xml: 1,356; asm: 613; php: 316; perl: 155
file content (1453 lines) | stat: -rw-r--r-- 77,258 bytes parent folder | download
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
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xenomai API: Synchronisation Services</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Synchronisation Services<br>
<small>
[<a class="el" href="group__driverapi.html">Driver Development API</a>,&nbsp;<a class="el" href="group__devregister.html">Device Registration Services</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Synchronisation Services:</div>
<div class="dynsection">
<center><table><tr><td><img src="group__rtdmsync.png" border="0" alt="" usemap="#group____rtdmsync_map">
<map name="group____rtdmsync_map">
<area shape="rect" href="group__devregister.html" title="Device Registration Services" alt="" coords="5,5,208,32"><area shape="rect" href="group__driverapi.html" title="Driver Development API" alt="" coords="20,56,193,83"></map></td></tr></table></center>
</div>

<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>RTDM_SELECTTYPE_xxx</h2></td></tr>
<tr><td colspan="2"><a class="anchor" name="RTDM_SELECTTYPE_xxx"></a> Event types select can bind to <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a> { <a class="el" href="group__rtdmsync.html#gge18228df8c70c9da1f90f61b01e925013ddb0fbad9f52ad3646be2e5a6ba8b2b">RTDM_SELECTTYPE_READ</a> =  XNSELECT_READ, 
<a class="el" href="group__rtdmsync.html#gge18228df8c70c9da1f90f61b01e9250137819f609dee2b20852001e9b7ecd462">RTDM_SELECTTYPE_WRITE</a> =  XNSELECT_WRITE, 
<a class="el" href="group__rtdmsync.html#gge18228df8c70c9da1f90f61b01e925012dd10c612a9e3c7e5134ee122ee3de74">RTDM_SELECTTYPE_EXCEPT</a> =  XNSELECT_EXCEPT
 }</td></tr>

<tr><td colspan="2"><br><h2>Spinlock with Preemption Deactivation</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gb6398c5dab6f8614bc8310b2248ae0b6"></a><!-- doxytag: member="rtdmsync::rtdm_lock_t" ref="gb6398c5dab6f8614bc8310b2248ae0b6" args="" -->
typedef rthal_spinlock_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gb6398c5dab6f8614bc8310b2248ae0b6">rtdm_lock_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lock variable. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7584217487c323356414e21200a57e63"></a><!-- doxytag: member="rtdmsync::rtdm_lockctx_t" ref="g7584217487c323356414e21200a57e63" args="" -->
typedef unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g7584217487c323356414e21200a57e63">rtdm_lockctx_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Variable to save the context while holding a lock. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1dd901a6311b10ef7961b5fce7fa9d41"></a><!-- doxytag: member="rtdmsync::RTDM_LOCK_UNLOCKED" ref="g1dd901a6311b10ef7961b5fce7fa9d41" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g1dd901a6311b10ef7961b5fce7fa9d41">RTDM_LOCK_UNLOCKED</a>&nbsp;&nbsp;&nbsp;RTHAL_SPIN_LOCK_UNLOCKED</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Static lock initialisation. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g6abf985ea7a0b13ec564cf0107fd8cba">rtdm_lock_init</a>(lock)&nbsp;&nbsp;&nbsp;rthal_spin_lock_init(lock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dynamic lock initialisation.  <a href="#g6abf985ea7a0b13ec564cf0107fd8cba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g65a4897268e15bda462b871976cb3909">rtdm_lock_get</a>(lock)&nbsp;&nbsp;&nbsp;rthal_spin_lock(lock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire lock from non-preemptible contexts.  <a href="#g65a4897268e15bda462b871976cb3909"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g963bdb01102d0076cd64f6bc72a347da">rtdm_lock_put</a>(lock)&nbsp;&nbsp;&nbsp;rthal_spin_unlock(lock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release lock without preemption restoration.  <a href="#g963bdb01102d0076cd64f6bc72a347da"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g985473873f9e32af688fe8a23634693d">rtdm_lock_get_irqsave</a>(lock, context)&nbsp;&nbsp;&nbsp;rthal_spin_lock_irqsave(lock, context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquire lock and disable preemption.  <a href="#g985473873f9e32af688fe8a23634693d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g4f1f8e33baf33b162636f63dec61aebd">rtdm_lock_put_irqrestore</a>(lock, context)&nbsp;&nbsp;&nbsp;rthal_spin_unlock_irqrestore(lock, context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release lock and restore preemption state.  <a href="#g4f1f8e33baf33b162636f63dec61aebd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g3d563fc5def018f743c55c452e061758">rtdm_lock_irqsave</a>(context)&nbsp;&nbsp;&nbsp;rthal_local_irq_save(context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable preemption locally.  <a href="#g3d563fc5def018f743c55c452e061758"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#ge03c387fcae8a55105dd31d7c008bbb4">rtdm_lock_irqrestore</a>(context)&nbsp;&nbsp;&nbsp;rthal_local_irq_restore(context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Restore preemption state.  <a href="#ge03c387fcae8a55105dd31d7c008bbb4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Timeout Sequence Management</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g531ddf80690059302409f760bd7f14d4">rtdm_toseq_init</a> (rtdm_toseq_t *timeout_seq, <a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a> timeout)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialise a timeout sequence.  <a href="#g531ddf80690059302409f760bd7f14d4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Event Services</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19">rtdm_event_init</a> (rtdm_event_t *event, unsigned long pending)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialise an event.  <a href="#gddf08d8ba5a44668bb360070a114fb19"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g7b27d0206027a07958d4a09017e8a3fe">rtdm_event_destroy</a> (rtdm_event_t *event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy an event.  <a href="#g7b27d0206027a07958d4a09017e8a3fe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g7c9745d1db8e6de244a6c2690cbb8b22">rtdm_event_pulse</a> (rtdm_event_t *event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal an event occurrence to currently listening waiters.  <a href="#g7c9745d1db8e6de244a6c2690cbb8b22"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g1217402b82034b26fe25c26f1e5b32c9">rtdm_event_signal</a> (rtdm_event_t *event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal an event occurrence.  <a href="#g1217402b82034b26fe25c26f1e5b32c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g1c433b50c53d49d164b084751861e855">rtdm_event_wait</a> (rtdm_event_t *event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait on event occurrence.  <a href="#g1c433b50c53d49d164b084751861e855"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0">rtdm_event_timedwait</a> (rtdm_event_t *event, <a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a> timeout, rtdm_toseq_t *timeout_seq)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait on event occurrence with timeout.  <a href="#gf76f858a3951ca2e20d3b1e00afa17e0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g732fe3cf3370df0f296f06fc4ac7f925">rtdm_event_clear</a> (rtdm_event_t *event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear event state.  <a href="#g732fe3cf3370df0f296f06fc4ac7f925"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g839656c781d87069dd1bf1c84c38e9d9">rtdm_event_select_bind</a> (rtdm_event_t *event, rtdm_selector_t *selector, enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a> type, unsigned fd_index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a selector to an event.  <a href="#g839656c781d87069dd1bf1c84c38e9d9"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Semaphore Services</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d">rtdm_sem_init</a> (rtdm_sem_t *sem, unsigned long value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialise a semaphore.  <a href="#ge1172824e463d7705ed3033e8aea133d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gf16f45217e54201ff3f24753982c41f8">rtdm_sem_destroy</a> (rtdm_sem_t *sem)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy a semaphore.  <a href="#gf16f45217e54201ff3f24753982c41f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g59da1b60b7279c1fc4355e2e0b2cc77c">rtdm_sem_down</a> (rtdm_sem_t *sem)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decrement a semaphore.  <a href="#g59da1b60b7279c1fc4355e2e0b2cc77c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g8aadb120a93df5dfd717c5bac6d4c1a9">rtdm_sem_timeddown</a> (rtdm_sem_t *sem, <a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a> timeout, rtdm_toseq_t *timeout_seq)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decrement a semaphore with timeout.  <a href="#g8aadb120a93df5dfd717c5bac6d4c1a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g829dbd8c5709d798ed06947b27001fed">rtdm_sem_up</a> (rtdm_sem_t *sem)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increment a semaphore.  <a href="#g829dbd8c5709d798ed06947b27001fed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gf61f576b0ff06f99399b27725aef0ae1">rtdm_sem_select_bind</a> (rtdm_sem_t *sem, rtdm_selector_t *selector, enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a> type, unsigned fd_index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a selector to a semaphore.  <a href="#gf61f576b0ff06f99399b27725aef0ae1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Mutex Services</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g8d58a144bf71df7b38bb887d036cbbb5">rtdm_mutex_init</a> (rtdm_mutex_t *mutex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialise a mutex.  <a href="#g8d58a144bf71df7b38bb887d036cbbb5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gd13170b569d0a4cdb46072e1e3a45527">rtdm_mutex_destroy</a> (rtdm_mutex_t *mutex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy a mutex.  <a href="#gd13170b569d0a4cdb46072e1e3a45527"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gb40ed579324d8cc76387a0e06dd0f82a">rtdm_mutex_unlock</a> (rtdm_mutex_t *mutex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release a mutex.  <a href="#gb40ed579324d8cc76387a0e06dd0f82a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g67c8f85c844df1aeed806e343a1b6437">rtdm_mutex_lock</a> (rtdm_mutex_t *mutex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a mutex.  <a href="#g67c8f85c844df1aeed806e343a1b6437"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g0789968300701ba2a940f5fe8b1fd4d8">rtdm_mutex_timedlock</a> (rtdm_mutex_t *mutex, <a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a> timeout, rtdm_toseq_t *timeout_seq)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a mutex with timeout.  <a href="#g0789968300701ba2a940f5fe8b1fd4d8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Global Lock across Scheduler Invocation</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#gbbaf52632d5dde7fa66e0b70d887493b">RTDM_EXECUTE_ATOMICALLY</a>(code_block)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Execute code block atomically.  <a href="#gbbaf52632d5dde7fa66e0b70d887493b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rtdmsync.html#g0f7da4cec7713ed732ffd99040e219e2">rtdm_select_bind</a> (int fd, rtdm_selector_t *selector, enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a> type, unsigned fd_index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a selector to specified event types of a given file descriptor.  <a href="#g0f7da4cec7713ed732ffd99040e219e2"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gbbaf52632d5dde7fa66e0b70d887493b"></a><!-- doxytag: member="rtdm_driver.h::RTDM_EXECUTE_ATOMICALLY" ref="gbbaf52632d5dde7fa66e0b70d887493b" args="(code_block)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RTDM_EXECUTE_ATOMICALLY          </td>
          <td>(</td>
          <td class="paramtype">code_block&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{                                               \
        &lt;ENTER_ATOMIC_SECTION&gt;                  \
        code_block;                             \
        &lt;LEAVE_ATOMIC_SECTION&gt;                  \
}
</pre></div>Execute code block atomically. 
<p>
Generally, it is illegal to suspend the current task by calling <a class="el" href="group__rtdmtask.html#gbfae53746165a83a75965b7b0f6710a0" title="Sleep a specified amount of time.">rtdm_task_sleep()</a>, <a class="el" href="group__rtdmsync.html#g1c433b50c53d49d164b084751861e855" title="Wait on event occurrence.">rtdm_event_wait()</a>, etc. while holding a spinlock. In contrast, this macro allows to combine several operations including a potentially rescheduling call to an atomic code block with respect to other <a class="el" href="group__rtdmsync.html#gbbaf52632d5dde7fa66e0b70d887493b" title="Execute code block atomically.">RTDM_EXECUTE_ATOMICALLY()</a> blocks. The macro is a light-weight alternative for protecting code blocks via mutexes, and it can even be used to synchronise real-time and non-real-time contexts.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>code_block</em>&nbsp;</td><td>Commands to be executed atomically</td></tr>
  </table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>It is not allowed to leave the code block explicitly by using <code>break</code>, <code>return</code>, <code>goto</code>, etc. This would leave the global lock held during the code block execution in an inconsistent state. Moreover, do not embed complex operations into the code bock. Consider that they will be executed under preemption lock with interrupts switched-off. Also note that invocation of rescheduling calls may break the atomicity until the task gains the CPU again.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible, depends on functions called within <em>code_block</em>. 
</div>
</div><p>
<a class="anchor" name="g65a4897268e15bda462b871976cb3909"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_get" ref="g65a4897268e15bda462b871976cb3909" args="(lock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_get          </td>
          <td>(</td>
          <td class="paramtype">lock&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_spin_lock(lock)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Acquire lock from non-preemptible contexts. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>Address of lock variable</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g985473873f9e32af688fe8a23634693d"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_get_irqsave" ref="g985473873f9e32af688fe8a23634693d" args="(lock, context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_get_irqsave          </td>
          <td>(</td>
          <td class="paramtype">lock,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">context&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_spin_lock_irqsave(lock, context)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Acquire lock and disable preemption. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>Address of lock variable </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>name of local variable to store the context in</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g6abf985ea7a0b13ec564cf0107fd8cba"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_init" ref="g6abf985ea7a0b13ec564cf0107fd8cba" args="(lock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_init          </td>
          <td>(</td>
          <td class="paramtype">lock&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_spin_lock_init(lock)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Dynamic lock initialisation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>Address of lock variable</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="ge03c387fcae8a55105dd31d7c008bbb4"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_irqrestore" ref="ge03c387fcae8a55105dd31d7c008bbb4" args="(context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_irqrestore          </td>
          <td>(</td>
          <td class="paramtype">context&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_local_irq_restore(context)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Restore preemption state. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>name of local variable which stored the context</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="g3d563fc5def018f743c55c452e061758"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_irqsave" ref="g3d563fc5def018f743c55c452e061758" args="(context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_irqsave          </td>
          <td>(</td>
          <td class="paramtype">context&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_local_irq_save(context)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Disable preemption locally. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>name of local variable to store the context in</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g963bdb01102d0076cd64f6bc72a347da"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_put" ref="g963bdb01102d0076cd64f6bc72a347da" args="(lock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_put          </td>
          <td>(</td>
          <td class="paramtype">lock&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_spin_unlock(lock)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release lock without preemption restoration. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>Address of lock variable</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g4f1f8e33baf33b162636f63dec61aebd"></a><!-- doxytag: member="rtdm_driver.h::rtdm_lock_put_irqrestore" ref="g4f1f8e33baf33b162636f63dec61aebd" args="(lock, context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rtdm_lock_put_irqrestore          </td>
          <td>(</td>
          <td class="paramtype">lock,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">context&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;rthal_spin_unlock_irqrestore(lock, context)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release lock and restore preemption state. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>Address of lock variable </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>name of local variable which stored the context</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="ge18228df8c70c9da1f90f61b01e92501"></a><!-- doxytag: member="rtdm_driver.h::rtdm_selecttype" ref="ge18228df8c70c9da1f90f61b01e92501" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gge18228df8c70c9da1f90f61b01e925013ddb0fbad9f52ad3646be2e5a6ba8b2b"></a><!-- doxytag: member="RTDM_SELECTTYPE_READ" ref="gge18228df8c70c9da1f90f61b01e925013ddb0fbad9f52ad3646be2e5a6ba8b2b" args="" -->RTDM_SELECTTYPE_READ</em>&nbsp;</td><td>
Select input data availability events. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gge18228df8c70c9da1f90f61b01e9250137819f609dee2b20852001e9b7ecd462"></a><!-- doxytag: member="RTDM_SELECTTYPE_WRITE" ref="gge18228df8c70c9da1f90f61b01e9250137819f609dee2b20852001e9b7ecd462" args="" -->RTDM_SELECTTYPE_WRITE</em>&nbsp;</td><td>
Select ouput buffer availability events. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gge18228df8c70c9da1f90f61b01e925012dd10c612a9e3c7e5134ee122ee3de74"></a><!-- doxytag: member="RTDM_SELECTTYPE_EXCEPT" ref="gge18228df8c70c9da1f90f61b01e925012dd10c612a9e3c7e5134ee122ee3de74" args="" -->RTDM_SELECTTYPE_EXCEPT</em>&nbsp;</td><td>
Select exceptional events. </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g732fe3cf3370df0f296f06fc4ac7f925"></a><!-- doxytag: member="drvlib.c::rtdm_event_clear" ref="g732fe3cf3370df0f296f06fc4ac7f925" args="(rtdm_event_t *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_event_clear           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clear event state. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g7b27d0206027a07958d4a09017e8a3fe"></a><!-- doxytag: member="drvlib.c::rtdm_event_destroy" ref="g7b27d0206027a07958d4a09017e8a3fe" args="(rtdm_event_t *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_event_destroy           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy an event. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="gddf08d8ba5a44668bb360070a114fb19"></a><!-- doxytag: member="drvlib.c::rtdm_event_init" ref="gddf08d8ba5a44668bb360070a114fb19" args="(rtdm_event_t *event, unsigned long pending)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_event_init           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>pending</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialise an event. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>pending</em>&nbsp;</td><td>Non-zero if event shall be initialised as set, 0 otherwise</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="select_8c-source.html#l00070">xnselect_init()</a>, and <a class="el" href="synch_8c-source.html#l00102">xnsynch_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g7c9745d1db8e6de244a6c2690cbb8b22"></a><!-- doxytag: member="drvlib.c::rtdm_event_pulse" ref="g7c9745d1db8e6de244a6c2690cbb8b22" args="(rtdm_event_t *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_event_pulse           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal an event occurrence to currently listening waiters. 
<p>
This function wakes up all current waiters of the given event, but it does not change the event state. Subsequently callers of <a class="el" href="group__rtdmsync.html#g1c433b50c53d49d164b084751861e855" title="Wait on event occurrence.">rtdm_event_wait()</a> or <a class="el" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0" title="Wait on event occurrence with timeout.">rtdm_event_timedwait()</a> will therefore be blocked first.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="g839656c781d87069dd1bf1c84c38e9d9"></a><!-- doxytag: member="drvlib.c::rtdm_event_select_bind" ref="g839656c781d87069dd1bf1c84c38e9d9" args="(rtdm_event_t *event, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_event_select_bind           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_selector_t *&nbsp;</td>
          <td class="paramname"> <em>selector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>fd_index</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Bind a selector to an event. 
<p>
This functions binds the given selector to an event so that the former is notified when the event state changes. Typically the select binding handler will invoke this service.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a> </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>selector</em>&nbsp;</td><td>Selector as passed to the select binding handler </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>type</em>&nbsp;</td><td>Type of the bound event as passed to the select binding handler </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd_index</em>&nbsp;</td><td>File descriptor index as passed to the select binding handler</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-ENOMEM is returned if there is insufficient memory to establish the dynamic binding.</li></ul>
<p>
<ul>
<li>-EINVAL is returned if <em>type</em> or <em>fd_index</em> are invalid.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="select_8c-source.html#l00110">xnselect_bind()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g1217402b82034b26fe25c26f1e5b32c9"></a><!-- doxytag: member="drvlib.c::rtdm_event_signal" ref="g1217402b82034b26fe25c26f1e5b32c9" args="(rtdm_event_t *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_event_signal           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal an event occurrence. 
<p>
This function sets the given event and wakes up all current waiters. If no waiter is presently registered, the next call to <a class="el" href="group__rtdmsync.html#g1c433b50c53d49d164b084751861e855" title="Wait on event occurrence.">rtdm_event_wait()</a> or <a class="el" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0" title="Wait on event occurrence with timeout.">rtdm_event_timedwait()</a> will return immediately.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="pod_8h-source.html#l00251">xnpod_schedule()</a>, and <a class="el" href="synch_8c-source.html#l00848">xnsynch_flush()</a>.</p>

</div>
</div><p>
<a class="anchor" name="gf76f858a3951ca2e20d3b1e00afa17e0"></a><!-- doxytag: member="drvlib.c::rtdm_event_timedwait" ref="gf76f858a3951ca2e20d3b1e00afa17e0" args="(rtdm_event_t *event, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_event_timedwait           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_toseq_t *&nbsp;</td>
          <td class="paramname"> <em>timeout_seq</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait on event occurrence with timeout. 
<p>
This function waits or tests for the occurence of the given event, taking the provided timeout into account. On successful return, the event is reset.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a> </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>timeout</em>&nbsp;</td><td>Relative timeout in nanoseconds, see <a class="el" href="group__rtdm.html#RTDM_TIMEOUT_xxx">RTDM_TIMEOUT_xxx</a> for special values </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>timeout_seq</em>&nbsp;</td><td>Handle of a timeout sequence as returned by <a class="el" href="group__rtdmsync.html#g531ddf80690059302409f760bd7f14d4" title="Initialise a timeout sequence.">rtdm_toseq_init()</a> or NULL</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-ETIMEDOUT is returned if the if the request has not been satisfied within the specified amount of time.</li></ul>
<p>
<ul>
<li>-EINTR is returned if calling task has been unblock by a signal or explicitly via <a class="el" href="group__rtdmtask.html#ge52cca97ebaf78eec2e31553a4dacd5e" title="Activate a blocked real-time task.">rtdm_task_unblock()</a>.</li></ul>
<p>
<ul>
<li>-EIDRM is returned if <em>event</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
<ul>
<li>-EWOULDBLOCK is returned if a negative <em>timeout</em> (i.e., non-blocking operation) has been specified.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="include_2nucleus_2thread_8h-source.html#l00110">XNBREAK</a>, <a class="el" href="include_2nucleus_2thread_8h-source.html#l00109">XNRMID</a>, <a class="el" href="synch_8c-source.html#l00171">xnsynch_sleep_on()</a>, and <a class="el" href="include_2nucleus_2thread_8h-source.html#l00108">XNTIMEO</a>.</p>

<p>Referenced by <a class="el" href="drvlib_8c-source.html#l00899">rtdm_event_wait()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g1c433b50c53d49d164b084751861e855"></a><!-- doxytag: member="drvlib.c::rtdm_event_wait" ref="g1c433b50c53d49d164b084751861e855" args="(rtdm_event_t *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_event_wait           </td>
          <td>(</td>
          <td class="paramtype">rtdm_event_t *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait on event occurrence. 
<p>
This is the light-weight version of <a class="el" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0" title="Wait on event occurrence with timeout.">rtdm_event_timedwait()</a>, implying an infinite timeout.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>event</em>&nbsp;</td><td>Event handle as returned by <a class="el" href="group__rtdmsync.html#gddf08d8ba5a44668bb360070a114fb19" title="Initialise an event.">rtdm_event_init()</a></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-EINTR is returned if calling task has been unblock by a signal or explicitly via <a class="el" href="group__rtdmtask.html#ge52cca97ebaf78eec2e31553a4dacd5e" title="Activate a blocked real-time task.">rtdm_task_unblock()</a>.</li></ul>
<p>
<ul>
<li>-EIDRM is returned if <em>event</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="drvlib_8c-source.html#l00944">rtdm_event_timedwait()</a>.</p>

</div>
</div><p>
<a class="anchor" name="gd13170b569d0a4cdb46072e1e3a45527"></a><!-- doxytag: member="drvlib.c::rtdm_mutex_destroy" ref="gd13170b569d0a4cdb46072e1e3a45527" args="(rtdm_mutex_t *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_mutex_destroy           </td>
          <td>(</td>
          <td class="paramtype">rtdm_mutex_t *&nbsp;</td>
          <td class="paramname"> <em>mutex</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy a mutex. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>mutex</em>&nbsp;</td><td>Mutex handle as returned by <a class="el" href="group__rtdmsync.html#g8d58a144bf71df7b38bb887d036cbbb5" title="Initialise a mutex.">rtdm_mutex_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="g8d58a144bf71df7b38bb887d036cbbb5"></a><!-- doxytag: member="drvlib.c::rtdm_mutex_init" ref="g8d58a144bf71df7b38bb887d036cbbb5" args="(rtdm_mutex_t *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_mutex_init           </td>
          <td>(</td>
          <td class="paramtype">rtdm_mutex_t *&nbsp;</td>
          <td class="paramname"> <em>mutex</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialise a mutex. 
<p>
This function initalises a basic mutex with priority inversion protection. "Basic", as it does not allow a mutex owner to recursively lock the same mutex again.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>mutex</em>&nbsp;</td><td>Mutex handle</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="synch_8c-source.html#l00102">xnsynch_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g67c8f85c844df1aeed806e343a1b6437"></a><!-- doxytag: member="drvlib.c::rtdm_mutex_lock" ref="g67c8f85c844df1aeed806e343a1b6437" args="(rtdm_mutex_t *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_mutex_lock           </td>
          <td>(</td>
          <td class="paramtype">rtdm_mutex_t *&nbsp;</td>
          <td class="paramname"> <em>mutex</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request a mutex. 
<p>
This is the light-weight version of <a class="el" href="group__rtdmsync.html#g0789968300701ba2a940f5fe8b1fd4d8" title="Request a mutex with timeout.">rtdm_mutex_timedlock()</a>, implying an infinite timeout.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>mutex</em>&nbsp;</td><td>Mutex handle as returned by <a class="el" href="group__rtdmsync.html#g8d58a144bf71df7b38bb887d036cbbb5" title="Initialise a mutex.">rtdm_mutex_init()</a></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-EIDRM is returned if <em>mutex</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="drvlib_8c-source.html#l01523">rtdm_mutex_timedlock()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g0789968300701ba2a940f5fe8b1fd4d8"></a><!-- doxytag: member="drvlib.c::rtdm_mutex_timedlock" ref="g0789968300701ba2a940f5fe8b1fd4d8" args="(rtdm_mutex_t *mutex, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_mutex_timedlock           </td>
          <td>(</td>
          <td class="paramtype">rtdm_mutex_t *&nbsp;</td>
          <td class="paramname"> <em>mutex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_toseq_t *&nbsp;</td>
          <td class="paramname"> <em>timeout_seq</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request a mutex with timeout. 
<p>
This function tries to acquire the given mutex. If it is not available, the caller is blocked unless non-blocking operation was selected.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>mutex</em>&nbsp;</td><td>Mutex handle as returned by <a class="el" href="group__rtdmsync.html#g8d58a144bf71df7b38bb887d036cbbb5" title="Initialise a mutex.">rtdm_mutex_init()</a> </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>timeout</em>&nbsp;</td><td>Relative timeout in nanoseconds, see <a class="el" href="group__rtdm.html#RTDM_TIMEOUT_xxx">RTDM_TIMEOUT_xxx</a> for special values </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>timeout_seq</em>&nbsp;</td><td>Handle of a timeout sequence as returned by <a class="el" href="group__rtdmsync.html#g531ddf80690059302409f760bd7f14d4" title="Initialise a timeout sequence.">rtdm_toseq_init()</a> or NULL</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-ETIMEDOUT is returned if the if the request has not been satisfied within the specified amount of time.</li></ul>
<p>
<ul>
<li>-EWOULDBLOCK is returned if <em>timeout</em> is negative and the semaphore value is currently not positive.</li></ul>
<p>
<ul>
<li>-EIDRM is returned if <em>mutex</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="include_2nucleus_2thread_8h-source.html#l00110">XNBREAK</a>, <a class="el" href="include_2nucleus_2thread_8h-source.html#l00109">XNRMID</a>, <a class="el" href="synch_8c-source.html#l00406">xnsynch_acquire()</a>, and <a class="el" href="include_2nucleus_2thread_8h-source.html#l00108">XNTIMEO</a>.</p>

<p>Referenced by <a class="el" href="drvlib_8c-source.html#l01482">rtdm_mutex_lock()</a>.</p>

</div>
</div><p>
<a class="anchor" name="gb40ed579324d8cc76387a0e06dd0f82a"></a><!-- doxytag: member="drvlib.c::rtdm_mutex_unlock" ref="gb40ed579324d8cc76387a0e06dd0f82a" args="(rtdm_mutex_t *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_mutex_unlock           </td>
          <td>(</td>
          <td class="paramtype">rtdm_mutex_t *&nbsp;</td>
          <td class="paramname"> <em>mutex</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release a mutex. 
<p>
This function releases the given mutex, waking up a potential waiter which was blocked upon <a class="el" href="group__rtdmsync.html#g67c8f85c844df1aeed806e343a1b6437" title="Request a mutex.">rtdm_mutex_lock()</a> or <a class="el" href="group__rtdmsync.html#g0789968300701ba2a940f5fe8b1fd4d8" title="Request a mutex with timeout.">rtdm_mutex_timedlock()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>mutex</em>&nbsp;</td><td>Mutex handle as returned by <a class="el" href="group__rtdmsync.html#g8d58a144bf71df7b38bb887d036cbbb5" title="Initialise a mutex.">rtdm_mutex_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="g0f7da4cec7713ed732ffd99040e219e2"></a><!-- doxytag: member="rtdm_driver.h::rtdm_select_bind" ref="g0f7da4cec7713ed732ffd99040e219e2" args="(int fd, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_select_bind           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_selector_t *&nbsp;</td>
          <td class="paramname"> <em>selector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>fd_index</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Bind a selector to specified event types of a given file descriptor. 
<p>
<p><b>For internal use only.</b></p>
<p>
This function is invoked by higher RTOS layers implementing select-like services. It shall not be called directly by RTDM drivers.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>File descriptor to bind to </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>selector</em>&nbsp;</td><td>Selector object that shall be bound to the given event </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>type</em>&nbsp;</td><td>Event type the caller is interested in </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd_index</em>&nbsp;</td><td>Index in the file descriptor set of the caller</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-EBADF is returned if the file descriptor <em>fd</em> cannot be resolved.</li></ul>
<p>
<ul>
<li>-EINVAL is returned if <em>type</em> or <em>fd_index</em> are invalid.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. </p>

<p>References <a class="el" href="rtdm__driver_8h-source.html#l00408">rtdm_dev_context::ops</a>, <a class="el" href="ksrc_2skins_2rtdm_2core_8c-source.html#l00077">rtdm_context_get()</a>, <a class="el" href="group__interdrv.html#ga48a3e04fd74cec81691d5d2187d7ef2">rtdm_context_unlock()</a>, and <a class="el" href="rtdm__driver_8h-source.html#l00350">rtdm_operations::select_bind</a>.</p>

</div>
</div><p>
<a class="anchor" name="gf16f45217e54201ff3f24753982c41f8"></a><!-- doxytag: member="drvlib.c::rtdm_sem_destroy" ref="gf16f45217e54201ff3f24753982c41f8" args="(rtdm_sem_t *sem)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_sem_destroy           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy a semaphore. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle as returned by <a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d" title="Initialise a semaphore.">rtdm_sem_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
</div>
</div><p>
<a class="anchor" name="g59da1b60b7279c1fc4355e2e0b2cc77c"></a><!-- doxytag: member="drvlib.c::rtdm_sem_down" ref="g59da1b60b7279c1fc4355e2e0b2cc77c" args="(rtdm_sem_t *sem)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_sem_down           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decrement a semaphore. 
<p>
This is the light-weight version of <a class="el" href="group__rtdmsync.html#g8aadb120a93df5dfd717c5bac6d4c1a9" title="Decrement a semaphore with timeout.">rtdm_sem_timeddown()</a>, implying an infinite timeout.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle as returned by <a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d" title="Initialise a semaphore.">rtdm_sem_init()</a></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-EINTR is returned if calling task has been unblock by a signal or explicitly via <a class="el" href="group__rtdmtask.html#ge52cca97ebaf78eec2e31553a4dacd5e" title="Activate a blocked real-time task.">rtdm_task_unblock()</a>.</li></ul>
<p>
<ul>
<li>-EIDRM is returned if <em>sem</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="drvlib_8c-source.html#l01229">rtdm_sem_timeddown()</a>.</p>

</div>
</div><p>
<a class="anchor" name="ge1172824e463d7705ed3033e8aea133d"></a><!-- doxytag: member="drvlib.c::rtdm_sem_init" ref="ge1172824e463d7705ed3033e8aea133d" args="(rtdm_sem_t *sem, unsigned long value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_sem_init           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialise a semaphore. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>value</em>&nbsp;</td><td>Initial value of the semaphore</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="ksrc_2skins_2posix_2sem_8c-source.html#l00139">sem_init()</a>, <a class="el" href="select_8c-source.html#l00070">xnselect_init()</a>, and <a class="el" href="synch_8c-source.html#l00102">xnsynch_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="gf61f576b0ff06f99399b27725aef0ae1"></a><!-- doxytag: member="drvlib.c::rtdm_sem_select_bind" ref="gf61f576b0ff06f99399b27725aef0ae1" args="(rtdm_sem_t *sem, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_sem_select_bind           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_selector_t *&nbsp;</td>
          <td class="paramname"> <em>selector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__rtdmsync.html#ge18228df8c70c9da1f90f61b01e92501">rtdm_selecttype</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>fd_index</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Bind a selector to a semaphore. 
<p>
This functions binds the given selector to the semaphore so that the former is notified when the semaphore state changes. Typically the select binding handler will invoke this service.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle as returned by <a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d" title="Initialise a semaphore.">rtdm_sem_init()</a> </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>selector</em>&nbsp;</td><td>Selector as passed to the select binding handler </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>type</em>&nbsp;</td><td>Type of the bound event as passed to the select binding handler </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd_index</em>&nbsp;</td><td>File descriptor index as passed to the select binding handler</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-ENOMEM is returned if there is insufficient memory to establish the dynamic binding.</li></ul>
<p>
<ul>
<li>-EINVAL is returned if <em>type</em> or <em>fd_index</em> are invalid.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="select_8c-source.html#l00110">xnselect_bind()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g8aadb120a93df5dfd717c5bac6d4c1a9"></a><!-- doxytag: member="drvlib.c::rtdm_sem_timeddown" ref="g8aadb120a93df5dfd717c5bac6d4c1a9" args="(rtdm_sem_t *sem, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rtdm_sem_timeddown           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rtdm_toseq_t *&nbsp;</td>
          <td class="paramname"> <em>timeout_seq</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decrement a semaphore with timeout. 
<p>
This function tries to decrement the given semphore's value if it is positive on entry. If not, the caller is blocked unless non-blocking operation was selected.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle as returned by <a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d" title="Initialise a semaphore.">rtdm_sem_init()</a> </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>timeout</em>&nbsp;</td><td>Relative timeout in nanoseconds, see <a class="el" href="group__rtdm.html#RTDM_TIMEOUT_xxx">RTDM_TIMEOUT_xxx</a> for special values </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>timeout_seq</em>&nbsp;</td><td>Handle of a timeout sequence as returned by <a class="el" href="group__rtdmsync.html#g531ddf80690059302409f760bd7f14d4" title="Initialise a timeout sequence.">rtdm_toseq_init()</a> or NULL</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, otherwise:</dd></dl>
<ul>
<li>-ETIMEDOUT is returned if the if the request has not been satisfied within the specified amount of time.</li></ul>
<p>
<ul>
<li>-EWOULDBLOCK is returned if <em>timeout</em> is negative and the semaphore value is currently not positive.</li></ul>
<p>
<ul>
<li>-EINTR is returned if calling task has been unblock by a signal or explicitly via <a class="el" href="group__rtdmtask.html#ge52cca97ebaf78eec2e31553a4dacd5e" title="Activate a blocked real-time task.">rtdm_task_unblock()</a>.</li></ul>
<p>
<ul>
<li>-EIDRM is returned if <em>sem</em> has been destroyed.</li></ul>
<p>
<ul>
<li>-EPERM <em>may</em> be returned if an illegal invocation environment is detected.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="ksrc_2skins_2posix_2sem_8c-source.html#l00670">sem_timedwait()</a>, <a class="el" href="include_2nucleus_2thread_8h-source.html#l00110">XNBREAK</a>, <a class="el" href="include_2nucleus_2thread_8h-source.html#l00109">XNRMID</a>, <a class="el" href="synch_8c-source.html#l00171">xnsynch_sleep_on()</a>, and <a class="el" href="include_2nucleus_2thread_8h-source.html#l00108">XNTIMEO</a>.</p>

<p>Referenced by <a class="el" href="drvlib_8c-source.html#l01184">rtdm_sem_down()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g829dbd8c5709d798ed06947b27001fed"></a><!-- doxytag: member="drvlib.c::rtdm_sem_up" ref="g829dbd8c5709d798ed06947b27001fed" args="(rtdm_sem_t *sem)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_sem_up           </td>
          <td>(</td>
          <td class="paramtype">rtdm_sem_t *&nbsp;</td>
          <td class="paramname"> <em>sem</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Increment a semaphore. 
<p>
This function increments the given semphore's value, waking up a potential waiter which was blocked upon <a class="el" href="group__rtdmsync.html#g59da1b60b7279c1fc4355e2e0b2cc77c" title="Decrement a semaphore.">rtdm_sem_down()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>sem</em>&nbsp;</td><td>Semaphore handle as returned by <a class="el" href="group__rtdmsync.html#ge1172824e463d7705ed3033e8aea133d" title="Initialise a semaphore.">rtdm_sem_init()</a></td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task (RT, non-RT)</li></ul>
<p>
Rescheduling: possible. 
<p>References <a class="el" href="pod_8h-source.html#l00251">xnpod_schedule()</a>, and <a class="el" href="synch_8c-source.html#l00237">xnsynch_wakeup_one_sleeper()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g531ddf80690059302409f760bd7f14d4"></a><!-- doxytag: member="drvlib.c::rtdm_toseq_init" ref="g531ddf80690059302409f760bd7f14d4" args="(rtdm_toseq_t *timeout_seq, nanosecs_rel_t timeout)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtdm_toseq_init           </td>
          <td>(</td>
          <td class="paramtype">rtdm_toseq_t *&nbsp;</td>
          <td class="paramname"> <em>timeout_seq</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda">nanosecs_rel_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialise a timeout sequence. 
<p>
This service initialises a timeout sequence handle according to the given timeout value. Timeout sequences allow to maintain a continuous <em>timeout</em> across multiple calls of blocking synchronisation services. A typical application scenario is given below.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>timeout_seq</em>&nbsp;</td><td>Timeout sequence handle </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>timeout</em>&nbsp;</td><td>Relative timeout in nanoseconds, see <a class="el" href="group__rtdm.html#RTDM_TIMEOUT_xxx">RTDM_TIMEOUT_xxx</a> for special values</td></tr>
  </table>
</dl>
Application Scenario: <div class="fragment"><pre class="fragment"><span class="keywordtype">int</span> device_service_routine(...)
{
        rtdm_toseq_t timeout_seq;
        ...

        <a class="code" href="group__rtdmsync.html#g531ddf80690059302409f760bd7f14d4" title="Initialise a timeout sequence.">rtdm_toseq_init</a>(&amp;timeout_seq, timeout);
        ...
        <span class="keywordflow">while</span> (received &lt; requested) {
                ret = <a class="code" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0" title="Wait on event occurrence with timeout.">rtdm_event_timedwait</a>(&amp;data_available, timeout, &amp;timeout_seq);
                <span class="keywordflow">if</span> (ret &lt; 0) <span class="comment">// including -ETIMEDOUT</span>
                        <span class="keywordflow">break</span>;

                <span class="comment">// receive some data</span>
                ...
        }
        ...
}
</pre></div> Using a timeout sequence in such a scenario avoids that the user-provided relative <code>timeout</code> is restarted on every call to <a class="el" href="group__rtdmsync.html#gf76f858a3951ca2e20d3b1e00afa17e0" title="Wait on event occurrence with timeout.">rtdm_event_timedwait()</a>, potentially causing an overall delay that is larger than specified by <code>timeout</code>. Moreover, all functions supporting timeout sequences also interpret special timeout values (infinite and non-blocking), disburdening the driver developer from handling them separately.<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel-based task</li><li>User-space task (RT)</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 2 12:48:39 2010 for Xenomai API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>