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
use super::{uint_t, ATR, ER, ER_ID, FLGPTN, ID, MODE, PRI, RELTIM, STAT, TMO};
pub const TA_TPRI: ATR = 0x01;
pub const TA_WMUL: ATR = 0x02;
pub const TA_CLR: ATR = 0x04;
pub const TA_CEILING: ATR = 0x03;
#[cfg(all(feature = "solid_asp3", feature = "pi_mutex"))]
pub const TA_INHERIT: ATR = 0x02;
pub const TWF_ORW: MODE = 0x01;
pub const TWF_ANDW: MODE = 0x02;
#[cfg(feature = "fmp3")]
pub const TSPN_UNL: STAT = 0x01;
#[cfg(feature = "fmp3")]
pub const TSPN_LOC: STAT = 0x02;
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RSEM {
pub wtskid: ID,
pub semcnt: uint_t,
}
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RFLG {
pub wtskid: ID,
pub flgptn: FLGPTN,
}
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RDTQ {
pub stskid: ID,
pub rtskid: ID,
pub sdtqcnt: uint_t,
}
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RPDQ {
pub stskid: ID,
pub rtskid: ID,
pub spdqcnt: uint_t,
}
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RMTX {
pub htskid: ID,
pub wtskid: ID,
}
#[cfg(any(
all(feature = "asp3", feature = "messagebuf"),
all(feature = "solid_asp3", feature = "messagebuf")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RMBF {
pub stskid: ID,
pub rtskid: ID,
pub smbfcnt: uint_t,
pub fmbfsz: usize,
}
#[cfg(any(feature = "fmp3", feature = "solid_fmp3"))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_RSPN {
pub spnstat: STAT,
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CSEM {
pub sematr: ATR,
pub isemcnt: uint_t,
pub maxsem: uint_t,
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CFLG {
pub flgatr: ATR,
pub iflgptn: FLGPTN,
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CDTQ {
pub dtqatr: ATR,
pub dtqcnt: uint_t,
pub dtqmb: *mut u8,
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CPDQ {
pub pdqatr: ATR,
pub pdqcnt: uint_t,
pub maxdpri: PRI,
pub pdqmb: *mut u8,
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CMTX {
pub mtxatr: ATR,
pub ceilpri: PRI,
}
#[cfg(all(feature = "solid_fmp3", feature = "dcre"))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CSPN {
pub spnatr: ATR,
}
#[cfg(all(feature = "solid_asp3", feature = "dcre", feature = "messagebuf"))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct T_CMBF {
pub mbfatr: ATR,
pub maxmsz: uint_t,
pub mbfsz: usize,
pub mbfmb: *mut u8,
}
#[cfg(any(
feature = "asp3",
feature = "fmp3",
feature = "solid_asp3",
feature = "solid_fmp3"
))]
extern "C" {
pub fn sig_sem(semid: ID) -> ER;
pub fn wai_sem(semid: ID) -> ER;
pub fn pol_sem(semid: ID) -> ER;
pub fn twai_sem(semid: ID, tmout: TMO) -> ER;
pub fn ini_sem(semid: ID) -> ER;
pub fn ref_sem(semid: ID, pk_rsem: *mut T_RSEM) -> ER;
pub fn set_flg(flgid: ID, setptn: FLGPTN) -> ER;
pub fn clr_flg(flgid: ID, clrptn: FLGPTN) -> ER;
pub fn wai_flg(flgid: ID, waiptn: FLGPTN, wfmode: MODE, p_flgptn: *mut FLGPTN) -> ER;
pub fn pol_flg(flgid: ID, waiptn: FLGPTN, wfmode: MODE, p_flgptn: *mut FLGPTN) -> ER;
pub fn twai_flg(
flgid: ID,
waiptn: FLGPTN,
wfmode: MODE,
p_flgptn: *mut FLGPTN,
tmout: TMO,
) -> ER;
pub fn ini_flg(flgid: ID) -> ER;
pub fn ref_flg(flgid: ID, pk_rflg: *mut T_RFLG) -> ER;
pub fn snd_dtq(dtqid: ID, data: isize) -> ER;
pub fn psnd_dtq(dtqid: ID, data: isize) -> ER;
pub fn tsnd_dtq(dtqid: ID, data: isize, tmout: TMO) -> ER;
pub fn fsnd_dtq(dtqid: ID, data: isize) -> ER;
pub fn rcv_dtq(dtqid: ID, p_data: *mut isize) -> ER;
pub fn prcv_dtq(dtqid: ID, p_data: *mut isize) -> ER;
pub fn trcv_dtq(dtqid: ID, p_data: *mut isize, tmout: TMO) -> ER;
pub fn ini_dtq(dtqid: ID) -> ER;
pub fn ref_dtq(dtqid: ID, pk_rdtq: *mut T_RDTQ) -> ER;
pub fn snd_pdq(pdqid: ID, data: isize, datapri: PRI) -> ER;
pub fn psnd_pdq(pdqid: ID, data: isize, datapri: PRI) -> ER;
pub fn tsnd_pdq(pdqid: ID, data: isize, datapri: PRI, tmout: TMO) -> ER;
pub fn rcv_pdq(pdqid: ID, p_data: *mut isize, p_datapri: *mut PRI) -> ER;
pub fn prcv_pdq(pdqid: ID, p_data: *mut isize, p_datapri: *mut PRI) -> ER;
pub fn trcv_pdq(pdqid: ID, p_data: *mut isize, p_datapri: *mut PRI, tmout: TMO) -> ER;
pub fn ini_pdq(pdqid: ID) -> ER;
pub fn ref_pdq(pdqid: ID, pk_rpdq: *mut T_RPDQ) -> ER;
pub fn loc_mtx(mtxid: ID) -> ER;
pub fn ploc_mtx(mtxid: ID) -> ER;
pub fn tloc_mtx(mtxid: ID, tmout: TMO) -> ER;
pub fn unl_mtx(mtxid: ID) -> ER;
pub fn ini_mtx(mtxid: ID) -> ER;
pub fn ref_mtx(mtxid: ID, pk_rmtx: *mut T_RMTX) -> ER;
}
#[cfg(any(feature = "fmp3", feature = "solid_fmp3"))]
extern "C" {
pub fn loc_spn(spnid: ID) -> ER;
pub fn unl_spn(spnid: ID) -> ER;
pub fn try_spn(spnid: ID) -> ER;
pub fn ref_spn(spnid: ID, pk_rspn: *mut T_RSPN) -> ER;
}
#[cfg(any(
all(feature = "asp3", feature = "dcre"),
all(feature = "solid_asp3", feature = "dcre"),
all(feature = "solid_fmp3", feature = "dcre")
))]
extern "C" {
pub fn acre_sem(pk_csem: *const T_CSEM) -> ER_ID;
pub fn acre_flg(pk_cflg: *const T_CFLG) -> ER_ID;
pub fn acre_dtq(pk_cdtq: *const T_CDTQ) -> ER_ID;
pub fn acre_pdq(pk_cpdq: *const T_CPDQ) -> ER_ID;
pub fn acre_mtx(pk_cmtx: *const T_CMTX) -> ER_ID;
pub fn del_sem(semid: ID) -> ER;
pub fn del_flg(flgid: ID) -> ER;
pub fn del_dtq(dtqid: ID) -> ER;
pub fn del_pdq(pdqid: ID) -> ER;
pub fn del_mtx(mtxid: ID) -> ER;
}
#[cfg(all(feature = "solid_fmp3", feature = "dcre"))]
extern "C" {
pub fn acre_spn(pk_cspn: *const T_CSPN) -> ER_ID;
pub fn del_spn(spnid: ID) -> ER;
}
#[cfg(any(
all(feature = "asp3", feature = "messagebuf"),
all(feature = "solid_asp3", feature = "messagebuf")
))]
extern "C" {
pub fn snd_mbf(mbfid: ID, msg: *const u8, msgsz: uint_t) -> ER;
pub fn psnd_mbf(mbfid: ID, msg: *const u8, msgsz: uint_t) -> ER;
pub fn tsnd_mbf(mbfid: ID, msg: *const u8, msgsz: uint_t, tmout: TMO) -> ER;
pub fn rcv_mbf(mbfid: ID, msg: *mut u8) -> super::ER_UINT;
pub fn prcv_mbf(mbfid: ID, msg: *mut u8) -> super::ER_UINT;
pub fn trcv_mbf(mbfid: ID, msg: *mut u8, tmout: TMO) -> super::ER_UINT;
pub fn ini_mbf(mbfid: ID) -> ER;
pub fn ref_mbf(mbfid: ID, pk_rmbf: *mut T_RMBF) -> ER;
}
#[cfg(all(feature = "solid_asp3", feature = "dcre", feature = "messagebuf"))]
extern "C" {
pub fn acre_mbf(pk_cmbf: *const T_CMBF) -> ER_ID;
pub fn del_mbf(mbfid: ID) -> ER;
}