Debian Codegraph @

debian/missing-sources/libc/src/unix/nto/neutrino.rs

raw
1 use crate::prelude::*;
2
3 pub type nto_job_t = crate::sync_t;
4
5 s! {
6 pub struct syspage_entry_info {
7 pub entry_off: u16,
8 pub entry_size: u16,
9 }
10 pub struct syspage_array_info {
11 entry_off: u16,
12 entry_size: u16,
13 element_size: u16,
14 }
15
16 pub struct intrspin {
17 pub value: c_uint, // volatile
18 }
19
20 pub struct iov_t {
21 pub iov_base: *mut c_void, // union
22 pub iov_len: size_t,
23 }
24
25 pub struct _itimer {
26 pub nsec: u64,
27 pub interval_nsec: u64,
28 }
29
30 pub struct _msg_info64 {
31 pub nd: u32,
32 pub srcnd: u32,
33 pub pid: crate::pid_t,
34 pub tid: i32,
35 pub chid: i32,
36 pub scoid: i32,
37 pub coid: i32,
38 pub priority: i16,
39 pub flags: i16,
40 pub msglen: isize,
41 pub srcmsglen: isize,
42 pub dstmsglen: isize,
43 pub type_id: u32,
44 reserved: Padding<u32>,
45 }
46
47 pub struct _cred_info {
48 pub ruid: crate::uid_t,
49 pub euid: crate::uid_t,
50 pub suid: crate::uid_t,
51 pub rgid: crate::gid_t,
52 pub egid: crate::gid_t,
53 pub sgid: crate::gid_t,
54 pub ngroups: u32,
55 pub grouplist: [crate::gid_t; 8],
56 }
57
58 pub struct _client_info {
59 pub nd: u32,
60 pub pid: crate::pid_t,
61 pub sid: crate::pid_t,
62 pub flags: u32,
63 pub cred: crate::_cred_info,
64 }
65
66 pub struct _client_able {
67 pub ability: u32,
68 pub flags: u32,
69 pub range_lo: u64,
70 pub range_hi: u64,
71 }
72
73 pub struct nto_channel_config {
74 pub event: crate::sigevent,
75 pub num_pulses: c_uint,
76 pub rearm_threshold: c_uint,
77 pub options: c_uint,
78 reserved: Padding<[c_uint; 3]>,
79 }
80
81 // TODO: The following structures are defined in a header file which doesn't
82 // appear as part of the default headers found in a standard installation
83 // of Neutrino 7.1 SDP. Commented out for now.
84 //pub struct _asyncmsg_put_header {
85 // pub err: c_int,
86 // pub iov: *mut crate::iov_t,
87 // pub parts: c_int,
88 // pub handle: c_uint,
89 // pub cb: Option<
90 // unsafe extern "C" fn(
91 // err: c_int,
92 // buf: *mut c_void,
93 // handle: c_uint,
94 // ) -> c_int>,
95 // pub put_hdr_flags: c_uint,
96 //}
97
98 //pub struct _asyncmsg_connection_attr {
99 // pub call_back: Option<
100 // unsafe extern "C" fn(
101 // err: c_int,
102 // buff: *mut c_void,
103 // handle: c_uint,
104 // ) -> c_int>,
105 // pub buffer_size: size_t,
106 // pub max_num_buffer: c_uint,
107 // pub trigger_num_msg: c_uint,
108 // pub trigger_time: crate::_itimer,
109 // reserve: Padding<c_uint>,
110 //}
111
112 //pub struct _asyncmsg_connection_descriptor {
113 // pub flags: c_uint,
114 // pub sendq_size: c_uint,
115 // pub sendq_head: c_uint,
116 // pub sendq_tail: c_uint,
117 // pub sendq_free: c_uint,
118 // pub err: c_int,
119 // pub ev: crate::sigevent,
120 // pub num_curmsg: c_uint,
121 // pub ttimer: crate::timer_t,
122 // pub block_con: crate::pthread_cond_t,
123 // pub mu: crate::pthread_mutex_t,
124 // reserved: Padding<c_uint>,
125 // pub attr: crate::_asyncmsg_connection_attr,
126 // reserves: Padding<[c_uint; 3]>,
127 // pub sendq: [crate::_asyncmsg_put_header; 1], // flexarray
128 //}
129
130 pub struct __c_anonymous_struct_ev {
131 pub event: crate::sigevent,
132 pub coid: c_int,
133 }
134
135 pub struct _channel_connect_attr {
136 // union
137 pub ev: crate::__c_anonymous_struct_ev,
138 }
139
140 // FIXME(1.0): This should not implement `PartialEq`
141 #[allow(unpredictable_function_pointer_comparisons)]
142 pub struct _sighandler_info {
143 pub siginfo: crate::siginfo_t,
144 pub handler: Option<unsafe extern "C" fn(value: c_int)>,
145 pub context: *mut c_void,
146 }
147
148 pub struct __c_anonymous_struct_time {
149 pub length: c_uint,
150 pub scale: c_uint,
151 }
152
153 pub struct _idle_hook {
154 pub hook_size: c_uint,
155 pub cmd: c_uint,
156 pub mode: c_uint,
157 pub latency: c_uint,
158 pub next_fire: u64,
159 pub curr_time: u64,
160 pub tod_adjust: u64,
161 pub resp: c_uint,
162 pub time: __c_anonymous_struct_time,
163 pub trigger: crate::sigevent,
164 pub intrs: *mut c_uint,
165 pub block_stack_size: c_uint,
166 }
167
168 pub struct _clockadjust {
169 pub tick_count: u32,
170 pub tick_nsec_inc: i32,
171 }
172
173 pub struct qtime_entry {
174 pub cycles_per_sec: u64,
175 pub nsec_tod_adjust: u64, // volatile
176 pub nsec: u64, // volatile
177 pub nsec_inc: u32,
178 pub boot_time: u32,
179 pub adjust: _clockadjust,
180 pub timer_rate: u32,
181 pub timer_scale: i32,
182 pub timer_load: u32,
183 pub intr: i32,
184 pub epoch: u32,
185 pub flags: u32,
186 pub rr_interval_mul: u32,
187 pub timer_load_hi: u32,
188 pub nsec_stable: u64, // volatile
189 pub timer_load_max: u64,
190 pub timer_prog_time: u32,
191 spare: [u32; 7],
192 }
193
194 pub struct _sched_info {
195 pub priority_min: c_int,
196 pub priority_max: c_int,
197 pub interval: u64,
198 pub priority_priv: c_int,
199 reserved: Padding<[c_int; 11]>,
200 }
201
202 pub struct _timer_info {
203 pub itime: crate::_itimer,
204 pub otime: crate::_itimer,
205 pub flags: u32,
206 pub tid: i32,
207 pub notify: i32,
208 pub clockid: crate::clockid_t,
209 pub overruns: u32,
210 pub event: crate::sigevent, // union
211 }
212
213 pub struct _clockperiod {
214 pub nsec: u32,
215 pub fract: i32,
216 }
217 }
218
219 s_no_extra_traits! {
220 #[repr(align(8))]
221 pub struct syspage_entry {
222 pub size: u16,
223 pub total_size: u16,
224 pub type_: u16,
225 pub num_cpu: u16,
226 pub system_private: syspage_entry_info,
227 pub old_asinfo: syspage_entry_info,
228 pub __mangle_name_to_cause_compilation_errs_meminfo: syspage_entry_info,
229 pub hwinfo: syspage_entry_info,
230 pub old_cpuinfo: syspage_entry_info,
231 pub old_cacheattr: syspage_entry_info,
232 pub qtime: syspage_entry_info,
233 pub callout: syspage_entry_info,
234 pub callin: syspage_entry_info,
235 pub typed_strings: syspage_entry_info,
236 pub strings: syspage_entry_info,
237 pub old_intrinfo: syspage_entry_info,
238 pub smp: syspage_entry_info,
239 pub pminfo: syspage_entry_info,
240 pub old_mdriver: syspage_entry_info,
241 spare0: [u32; 1],
242 __reserved: Padding<[u8; 160]>, // anonymous union with architecture dependent structs
243 pub new_asinfo: syspage_array_info,
244 pub new_cpuinfo: syspage_array_info,
245 pub new_cacheattr: syspage_array_info,
246 pub new_intrinfo: syspage_array_info,
247 pub new_mdriver: syspage_array_info,
248 }
249 }
250
251 pub const SYSMGR_PID: u32 = 1;
252 pub const SYSMGR_CHID: u32 = 1;
253 pub const SYSMGR_COID: u32 = _NTO_SIDE_CHANNEL;
254 pub const SYSMGR_HANDLE: u32 = 0;
255
256 pub const STATE_DEAD: c_int = 0x00;
257 pub const STATE_RUNNING: c_int = 0x01;
258 pub const STATE_READY: c_int = 0x02;
259 pub const STATE_STOPPED: c_int = 0x03;
260 pub const STATE_SEND: c_int = 0x04;
261 pub const STATE_RECEIVE: c_int = 0x05;
262 pub const STATE_REPLY: c_int = 0x06;
263 pub const STATE_STACK: c_int = 0x07;
264 pub const STATE_WAITTHREAD: c_int = 0x08;
265 pub const STATE_WAITPAGE: c_int = 0x09;
266 pub const STATE_SIGSUSPEND: c_int = 0x0a;
267 pub const STATE_SIGWAITINFO: c_int = 0x0b;
268 pub const STATE_NANOSLEEP: c_int = 0x0c;
269 pub const STATE_MUTEX: c_int = 0x0d;
270 pub const STATE_CONDVAR: c_int = 0x0e;
271 pub const STATE_JOIN: c_int = 0x0f;
272 pub const STATE_INTR: c_int = 0x10;
273 pub const STATE_SEM: c_int = 0x11;
274 pub const STATE_WAITCTX: c_int = 0x12;
275 pub const STATE_NET_SEND: c_int = 0x13;
276 pub const STATE_NET_REPLY: c_int = 0x14;
277 pub const STATE_MAX: c_int = 0x18;
278
279 pub const _NTO_TIMEOUT_RECEIVE: i32 = 1 << STATE_RECEIVE;
280 pub const _NTO_TIMEOUT_SEND: i32 = 1 << STATE_SEND;
281 pub const _NTO_TIMEOUT_REPLY: i32 = 1 << STATE_REPLY;
282 pub const _NTO_TIMEOUT_SIGSUSPEND: i32 = 1 << STATE_SIGSUSPEND;
283 pub const _NTO_TIMEOUT_SIGWAITINFO: i32 = 1 << STATE_SIGWAITINFO;
284 pub const _NTO_TIMEOUT_NANOSLEEP: i32 = 1 << STATE_NANOSLEEP;
285 pub const _NTO_TIMEOUT_MUTEX: i32 = 1 << STATE_MUTEX;
286 pub const _NTO_TIMEOUT_CONDVAR: i32 = 1 << STATE_CONDVAR;
287 pub const _NTO_TIMEOUT_JOIN: i32 = 1 << STATE_JOIN;
288 pub const _NTO_TIMEOUT_INTR: i32 = 1 << STATE_INTR;
289 pub const _NTO_TIMEOUT_SEM: i32 = 1 << STATE_SEM;
290
291 pub const _NTO_MI_ENDIAN_BIG: u32 = 1;
292 pub const _NTO_MI_ENDIAN_DIFF: u32 = 2;
293 pub const _NTO_MI_UNBLOCK_REQ: u32 = 256;
294 pub const _NTO_MI_NET_CRED_DIRTY: u32 = 512;
295 pub const _NTO_MI_CONSTRAINED: u32 = 1024;
296 pub const _NTO_MI_CHROOT: u32 = 2048;
297 pub const _NTO_MI_BITS_64: u32 = 4096;
298 pub const _NTO_MI_BITS_DIFF: u32 = 8192;
299 pub const _NTO_MI_SANDBOX: u32 = 16384;
300
301 pub const _NTO_CI_ENDIAN_BIG: u32 = 1;
302 pub const _NTO_CI_BKGND_PGRP: u32 = 4;
303 pub const _NTO_CI_ORPHAN_PGRP: u32 = 8;
304 pub const _NTO_CI_STOPPED: u32 = 128;
305 pub const _NTO_CI_UNABLE: u32 = 256;
306 pub const _NTO_CI_TYPE_ID: u32 = 512;
307 pub const _NTO_CI_CHROOT: u32 = 2048;
308 pub const _NTO_CI_BITS_64: u32 = 4096;
309 pub const _NTO_CI_SANDBOX: u32 = 16384;
310 pub const _NTO_CI_LOADER: u32 = 32768;
311 pub const _NTO_CI_FULL_GROUPS: u32 = 2147483648;
312
313 pub const _NTO_TI_ACTIVE: u32 = 1;
314 pub const _NTO_TI_ABSOLUTE: u32 = 2;
315 pub const _NTO_TI_EXPIRED: u32 = 4;
316 pub const _NTO_TI_TOD_BASED: u32 = 8;
317 pub const _NTO_TI_TARGET_PROCESS: u32 = 16;
318 pub const _NTO_TI_REPORT_TOLERANCE: u32 = 32;
319 pub const _NTO_TI_PRECISE: u32 = 64;
320 pub const _NTO_TI_TOLERANT: u32 = 128;
321 pub const _NTO_TI_WAKEUP: u32 = 256;
322 pub const _NTO_TI_PROCESS_TOLERANT: u32 = 512;
323 pub const _NTO_TI_HIGH_RESOLUTION: u32 = 1024;
324
325 pub const _PULSE_TYPE: u32 = 0;
326 pub const _PULSE_SUBTYPE: u32 = 0;
327 pub const _PULSE_CODE_UNBLOCK: i32 = -32;
328 pub const _PULSE_CODE_DISCONNECT: i32 = -33;
329 pub const _PULSE_CODE_THREADDEATH: i32 = -34;
330 pub const _PULSE_CODE_COIDDEATH: i32 = -35;
331 pub const _PULSE_CODE_NET_ACK: i32 = -36;
332 pub const _PULSE_CODE_NET_UNBLOCK: i32 = -37;
333 pub const _PULSE_CODE_NET_DETACH: i32 = -38;
334 pub const _PULSE_CODE_RESTART: i32 = -39;
335 pub const _PULSE_CODE_NORESTART: i32 = -40;
336 pub const _PULSE_CODE_UNBLOCK_RESTART: i32 = -41;
337 pub const _PULSE_CODE_UNBLOCK_TIMER: i32 = -42;
338 pub const _PULSE_CODE_MINAVAIL: u32 = 0;
339 pub const _PULSE_CODE_MAXAVAIL: u32 = 127;
340
341 pub const _NTO_HARD_FLAGS_END: u32 = 1;
342
343 pub const _NTO_PULSE_IF_UNIQUE: u32 = 4096;
344 pub const _NTO_PULSE_REPLACE: u32 = 8192;
345
346 pub const _NTO_PF_NOCLDSTOP: u32 = 1;
347 pub const _NTO_PF_LOADING: u32 = 2;
348 pub const _NTO_PF_TERMING: u32 = 4;
349 pub const _NTO_PF_ZOMBIE: u32 = 8;
350 pub const _NTO_PF_NOZOMBIE: u32 = 16;
351 pub const _NTO_PF_FORKED: u32 = 32;
352 pub const _NTO_PF_ORPHAN_PGRP: u32 = 64;
353 pub const _NTO_PF_STOPPED: u32 = 128;
354 pub const _NTO_PF_DEBUG_STOPPED: u32 = 256;
355 pub const _NTO_PF_BKGND_PGRP: u32 = 512;
356 pub const _NTO_PF_NOISYNC: u32 = 1024;
357 pub const _NTO_PF_CONTINUED: u32 = 2048;
358 pub const _NTO_PF_CHECK_INTR: u32 = 4096;
359 pub const _NTO_PF_COREDUMP: u32 = 8192;
360 pub const _NTO_PF_RING0: u32 = 32768;
361 pub const _NTO_PF_SLEADER: u32 = 65536;
362 pub const _NTO_PF_WAITINFO: u32 = 131072;
363 pub const _NTO_PF_DESTROYALL: u32 = 524288;
364 pub const _NTO_PF_NOCOREDUMP: u32 = 1048576;
365 pub const _NTO_PF_WAITDONE: u32 = 4194304;
366 pub const _NTO_PF_TERM_WAITING: u32 = 8388608;
367 pub const _NTO_PF_ASLR: u32 = 16777216;
368 pub const _NTO_PF_EXECED: u32 = 33554432;
369 pub const _NTO_PF_APP_STOPPED: u32 = 67108864;
370 pub const _NTO_PF_64BIT: u32 = 134217728;
371 pub const _NTO_PF_NET: u32 = 268435456;
372 pub const _NTO_PF_NOLAZYSTACK: u32 = 536870912;
373 pub const _NTO_PF_NOEXEC_STACK: u32 = 1073741824;
374 pub const _NTO_PF_LOADER_PERMS: u32 = 2147483648;
375
376 pub const _NTO_TF_INTR_PENDING: u32 = 65536;
377 pub const _NTO_TF_DETACHED: u32 = 131072;
378 pub const _NTO_TF_SHR_MUTEX: u32 = 262144;
379 pub const _NTO_TF_SHR_MUTEX_EUID: u32 = 524288;
380 pub const _NTO_TF_THREADS_HOLD: u32 = 1048576;
381 pub const _NTO_TF_UNBLOCK_REQ: u32 = 4194304;
382 pub const _NTO_TF_ALIGN_FAULT: u32 = 16777216;
383 pub const _NTO_TF_SSTEP: u32 = 33554432;
384 pub const _NTO_TF_ALLOCED_STACK: u32 = 67108864;
385 pub const _NTO_TF_NOMULTISIG: u32 = 134217728;
386 pub const _NTO_TF_LOW_LATENCY: u32 = 268435456;
387 pub const _NTO_TF_IOPRIV: u32 = 2147483648;
388
389 pub const _NTO_TCTL_IO_PRIV: u32 = 1;
390 pub const _NTO_TCTL_THREADS_HOLD: u32 = 2;
391 pub const _NTO_TCTL_THREADS_CONT: u32 = 3;
392 pub const _NTO_TCTL_RUNMASK: u32 = 4;
393 pub const _NTO_TCTL_ALIGN_FAULT: u32 = 5;
394 pub const _NTO_TCTL_RUNMASK_GET_AND_SET: u32 = 6;
395 pub const _NTO_TCTL_PERFCOUNT: u32 = 7;
396 pub const _NTO_TCTL_ONE_THREAD_HOLD: u32 = 8;
397 pub const _NTO_TCTL_ONE_THREAD_CONT: u32 = 9;
398 pub const _NTO_TCTL_RUNMASK_GET_AND_SET_INHERIT: u32 = 10;
399 pub const _NTO_TCTL_NAME: u32 = 11;
400 pub const _NTO_TCTL_RCM_GET_AND_SET: u32 = 12;
401 pub const _NTO_TCTL_SHR_MUTEX: u32 = 13;
402 pub const _NTO_TCTL_IO: u32 = 14;
403 pub const _NTO_TCTL_NET_KIF_GET_AND_SET: u32 = 15;
404 pub const _NTO_TCTL_LOW_LATENCY: u32 = 16;
405 pub const _NTO_TCTL_ADD_EXIT_EVENT: u32 = 17;
406 pub const _NTO_TCTL_DEL_EXIT_EVENT: u32 = 18;
407 pub const _NTO_TCTL_IO_LEVEL: u32 = 19;
408 pub const _NTO_TCTL_RESERVED: u32 = 2147483648;
409 pub const _NTO_TCTL_IO_LEVEL_INHERIT: u32 = 1073741824;
410 pub const _NTO_IO_LEVEL_NONE: u32 = 1;
411 pub const _NTO_IO_LEVEL_1: u32 = 2;
412 pub const _NTO_IO_LEVEL_2: u32 = 3;
413
414 pub const _NTO_THREAD_NAME_MAX: u32 = 100;
415
416 pub const _NTO_CHF_FIXED_PRIORITY: u32 = 1;
417 pub const _NTO_CHF_UNBLOCK: u32 = 2;
418 pub const _NTO_CHF_THREAD_DEATH: u32 = 4;
419 pub const _NTO_CHF_DISCONNECT: u32 = 8;
420 pub const _NTO_CHF_NET_MSG: u32 = 16;
421 pub const _NTO_CHF_SENDER_LEN: u32 = 32;
422 pub const _NTO_CHF_COID_DISCONNECT: u32 = 64;
423 pub const _NTO_CHF_REPLY_LEN: u32 = 128;
424 pub const _NTO_CHF_PULSE_POOL: u32 = 256;
425 pub const _NTO_CHF_ASYNC_NONBLOCK: u32 = 512;
426 pub const _NTO_CHF_ASYNC: u32 = 1024;
427 pub const _NTO_CHF_GLOBAL: u32 = 2048;
428 pub const _NTO_CHF_PRIVATE: u32 = 4096;
429 pub const _NTO_CHF_MSG_PAUSING: u32 = 8192;
430 pub const _NTO_CHF_INHERIT_RUNMASK: u32 = 16384;
431 pub const _NTO_CHF_UNBLOCK_TIMER: u32 = 32768;
432
433 pub const _NTO_CHO_CUSTOM_EVENT: u32 = 1;
434
435 pub const _NTO_COF_CLOEXEC: u32 = 1;
436 pub const _NTO_COF_DEAD: u32 = 2;
437 pub const _NTO_COF_NOSHARE: u32 = 64;
438 pub const _NTO_COF_NETCON: u32 = 128;
439 pub const _NTO_COF_NONBLOCK: u32 = 256;
440 pub const _NTO_COF_ASYNC: u32 = 512;
441 pub const _NTO_COF_GLOBAL: u32 = 1024;
442 pub const _NTO_COF_NOEVENT: u32 = 2048;
443 pub const _NTO_COF_INSECURE: u32 = 4096;
444 pub const _NTO_COF_REG_EVENTS: u32 = 8192;
445 pub const _NTO_COF_UNREG_EVENTS: u32 = 16384;
446 pub const _NTO_COF_MASK: u32 = 65535;
447
448 pub const _NTO_SIDE_CHANNEL: u32 = 1073741824;
449
450 pub const _NTO_CONNECTION_SCOID: u32 = 65536;
451 pub const _NTO_GLOBAL_CHANNEL: u32 = 1073741824;
452
453 pub const _NTO_TIMEOUT_MASK: u32 = (1 << STATE_MAX) - 1;
454 pub const _NTO_TIMEOUT_ACTIVE: u32 = 1 << STATE_MAX;
455 pub const _NTO_TIMEOUT_IMMEDIATE: u32 = 1 << (STATE_MAX + 1);
456
457 pub const _NTO_IC_LATENCY: u32 = 0;
458
459 pub const _NTO_INTR_FLAGS_END: u32 = 1;
460 pub const _NTO_INTR_FLAGS_NO_UNMASK: u32 = 2;
461 pub const _NTO_INTR_FLAGS_PROCESS: u32 = 4;
462 pub const _NTO_INTR_FLAGS_TRK_MSK: u32 = 8;
463 pub const _NTO_INTR_FLAGS_ARRAY: u32 = 16;
464 pub const _NTO_INTR_FLAGS_EXCLUSIVE: u32 = 32;
465 pub const _NTO_INTR_FLAGS_FPU: u32 = 64;
466
467 pub const _NTO_INTR_CLASS_EXTERNAL: u32 = 0;
468 pub const _NTO_INTR_CLASS_SYNTHETIC: u32 = 2147418112;
469
470 pub const _NTO_INTR_SPARE: u32 = 2147483647;
471
472 pub const _NTO_HOOK_IDLE: u32 = 2147418113;
473 pub const _NTO_HOOK_OVERDRIVE: u32 = 2147418114;
474 pub const _NTO_HOOK_LAST: u32 = 2147418114;
475 pub const _NTO_HOOK_IDLE2_FLAG: u32 = 32768;
476
477 pub const _NTO_IH_CMD_SLEEP_SETUP: u32 = 1;
478 pub const _NTO_IH_CMD_SLEEP_BLOCK: u32 = 2;
479 pub const _NTO_IH_CMD_SLEEP_WAKEUP: u32 = 4;
480 pub const _NTO_IH_CMD_SLEEP_ONLINE: u32 = 8;
481 pub const _NTO_IH_RESP_NEEDS_BLOCK: u32 = 1;
482 pub const _NTO_IH_RESP_NEEDS_WAKEUP: u32 = 2;
483 pub const _NTO_IH_RESP_NEEDS_ONLINE: u32 = 4;
484 pub const _NTO_IH_RESP_SYNC_TIME: u32 = 16;
485 pub const _NTO_IH_RESP_SYNC_TLB: u32 = 32;
486 pub const _NTO_IH_RESP_SUGGEST_OFFLINE: u32 = 256;
487 pub const _NTO_IH_RESP_SLEEP_MODE_REACHED: u32 = 512;
488 pub const _NTO_IH_RESP_DELIVER_INTRS: u32 = 1024;
489
490 pub const _NTO_READIOV_SEND: u32 = 0;
491 pub const _NTO_READIOV_REPLY: u32 = 1;
492
493 pub const _NTO_KEYDATA_VTID: u32 = 2147483648;
494
495 pub const _NTO_KEYDATA_PATHSIGN: u32 = 32768;
496 pub const _NTO_KEYDATA_OP_MASK: u32 = 255;
497 pub const _NTO_KEYDATA_VERIFY: u32 = 0;
498 pub const _NTO_KEYDATA_CALCULATE: u32 = 1;
499 pub const _NTO_KEYDATA_CALCULATE_REUSE: u32 = 2;
500 pub const _NTO_KEYDATA_PATHSIGN_VERIFY: u32 = 32768;
501 pub const _NTO_KEYDATA_PATHSIGN_CALCULATE: u32 = 32769;
502 pub const _NTO_KEYDATA_PATHSIGN_CALCULATE_REUSE: u32 = 32770;
503
504 pub const _NTO_SCTL_SETPRIOCEILING: u32 = 1;
505 pub const _NTO_SCTL_GETPRIOCEILING: u32 = 2;
506 pub const _NTO_SCTL_SETEVENT: u32 = 3;
507 pub const _NTO_SCTL_MUTEX_WAKEUP: u32 = 4;
508 pub const _NTO_SCTL_MUTEX_CONSISTENT: u32 = 5;
509 pub const _NTO_SCTL_SEM_VALUE: u32 = 6;
510
511 pub const _NTO_CLIENTINFO_GETGROUPS: u32 = 1;
512 pub const _NTO_CLIENTINFO_GETTYPEID: u32 = 2;
513
514 extern "C" {
515 pub fn ChannelCreate(__flags: c_uint) -> c_int;
516 pub fn ChannelCreate_r(__flags: c_uint) -> c_int;
517 pub fn ChannelCreatePulsePool(__flags: c_uint, __config: *const nto_channel_config) -> c_int;
518 pub fn ChannelCreateExt(
519 __flags: c_uint,
520 __mode: crate::mode_t,
521 __bufsize: usize,
522 __maxnumbuf: c_uint,
523 __ev: *const crate::sigevent,
524 __cred: *mut _cred_info,
525 ) -> c_int;
526 pub fn ChannelDestroy(__chid: c_int) -> c_int;
527 pub fn ChannelDestroy_r(__chid: c_int) -> c_int;
528 pub fn ConnectAttach(
529 __nd: u32,
530 __pid: crate::pid_t,
531 __chid: c_int,
532 __index: c_uint,
533 __flags: c_int,
534 ) -> c_int;
535 pub fn ConnectAttach_r(
536 __nd: u32,
537 __pid: crate::pid_t,
538 __chid: c_int,
539 __index: c_uint,
540 __flags: c_int,
541 ) -> c_int;
542
543 // TODO: The following function uses a structure defined in a header file
544 // which doesn't appear as part of the default headers found in a
545 // standard installation of Neutrino 7.1 SDP. Commented out for now.
546 //pub fn ConnectAttachExt(
547 // __nd: u32,
548 // __pid: crate::pid_t,
549 // __chid: c_int,
550 // __index: c_uint,
551 // __flags: c_int,
552 // __cd: *mut _asyncmsg_connection_descriptor,
553 //) -> c_int;
554 pub fn ConnectDetach(__coid: c_int) -> c_int;
555 pub fn ConnectDetach_r(__coid: c_int) -> c_int;
556 pub fn ConnectServerInfo(__pid: crate::pid_t, __coid: c_int, __info: *mut _msg_info64)
557 -> c_int;
558 pub fn ConnectServerInfo_r(
559 __pid: crate::pid_t,
560 __coid: c_int,
561 __info: *mut _msg_info64,
562 ) -> c_int;
563 pub fn ConnectClientInfoExtraArgs(
564 __scoid: c_int,
565 __info_pp: *mut _client_info,
566 __ngroups: c_int,
567 __abilities: *mut _client_able,
568 __nable: c_int,
569 __type_id: *mut c_uint,
570 ) -> c_int;
571 pub fn ConnectClientInfoExtraArgs_r(
572 __scoid: c_int,
573 __info_pp: *mut _client_info,
574 __ngroups: c_int,
575 __abilities: *mut _client_able,
576 __nable: c_int,
577 __type_id: *mut c_uint,
578 ) -> c_int;
579 pub fn ConnectClientInfo(__scoid: c_int, __info: *mut _client_info, __ngroups: c_int) -> c_int;
580 pub fn ConnectClientInfo_r(
581 __scoid: c_int,
582 __info: *mut _client_info,
583 __ngroups: c_int,
584 ) -> c_int;
585 pub fn ConnectClientInfoExt(
586 __scoid: c_int,
587 __info_pp: *mut *mut _client_info,
588 flags: c_int,
589 ) -> c_int;
590 pub fn ClientInfoExtFree(__info_pp: *mut *mut _client_info) -> c_int;
591 pub fn ConnectClientInfoAble(
592 __scoid: c_int,
593 __info_pp: *mut *mut _client_info,
594 flags: c_int,
595 abilities: *mut _client_able,
596 nable: c_int,
597 ) -> c_int;
598 pub fn ConnectFlags(
599 __pid: crate::pid_t,
600 __coid: c_int,
601 __mask: c_uint,
602 __bits: c_uint,
603 ) -> c_int;
604 pub fn ConnectFlags_r(
605 __pid: crate::pid_t,
606 __coid: c_int,
607 __mask: c_uint,
608 __bits: c_uint,
609 ) -> c_int;
610 pub fn ChannelConnectAttr(
611 __id: c_uint,
612 __old_attr: *mut _channel_connect_attr,
613 __new_attr: *mut _channel_connect_attr,
614 __flags: c_uint,
615 ) -> c_int;
616 pub fn MsgSend(
617 __coid: c_int,
618 __smsg: *const c_void,
619 __sbytes: usize,
620 __rmsg: *mut c_void,
621 __rbytes: usize,
622 ) -> c_long;
623 pub fn MsgSend_r(
624 __coid: c_int,
625 __smsg: *const c_void,
626 __sbytes: usize,
627 __rmsg: *mut c_void,
628 __rbytes: usize,
629 ) -> c_long;
630 pub fn MsgSendnc(
631 __coid: c_int,
632 __smsg: *const c_void,
633 __sbytes: usize,
634 __rmsg: *mut c_void,
635 __rbytes: usize,
636 ) -> c_long;
637 pub fn MsgSendnc_r(
638 __coid: c_int,
639 __smsg: *const c_void,
640 __sbytes: usize,
641 __rmsg: *mut c_void,
642 __rbytes: usize,
643 ) -> c_long;
644 pub fn MsgSendsv(
645 __coid: c_int,
646 __smsg: *const c_void,
647 __sbytes: usize,
648 __riov: *const crate::iovec,
649 __rparts: usize,
650 ) -> c_long;
651 pub fn MsgSendsv_r(
652 __coid: c_int,
653 __smsg: *const c_void,
654 __sbytes: usize,
655 __riov: *const crate::iovec,
656 __rparts: usize,
657 ) -> c_long;
658 pub fn MsgSendsvnc(
659 __coid: c_int,
660 __smsg: *const c_void,
661 __sbytes: usize,
662 __riov: *const crate::iovec,
663 __rparts: usize,
664 ) -> c_long;
665 pub fn MsgSendsvnc_r(
666 __coid: c_int,
667 __smsg: *const c_void,
668 __sbytes: usize,
669 __riov: *const crate::iovec,
670 __rparts: usize,
671 ) -> c_long;
672 pub fn MsgSendvs(
673 __coid: c_int,
674 __siov: *const crate::iovec,
675 __sparts: usize,
676 __rmsg: *mut c_void,
677 __rbytes: usize,
678 ) -> c_long;
679 pub fn MsgSendvs_r(
680 __coid: c_int,
681 __siov: *const crate::iovec,
682 __sparts: usize,
683 __rmsg: *mut c_void,
684 __rbytes: usize,
685 ) -> c_long;
686 pub fn MsgSendvsnc(
687 __coid: c_int,
688 __siov: *const crate::iovec,
689 __sparts: usize,
690 __rmsg: *mut c_void,
691 __rbytes: usize,
692 ) -> c_long;
693 pub fn MsgSendvsnc_r(
694 __coid: c_int,
695 __siov: *const crate::iovec,
696 __sparts: usize,
697 __rmsg: *mut c_void,
698 __rbytes: usize,
699 ) -> c_long;
700 pub fn MsgSendv(
701 __coid: c_int,
702 __siov: *const crate::iovec,
703 __sparts: usize,
704 __riov: *const crate::iovec,
705 __rparts: usize,
706 ) -> c_long;
707 pub fn MsgSendv_r(
708 __coid: c_int,
709 __siov: *const crate::iovec,
710 __sparts: usize,
711 __riov: *const crate::iovec,
712 __rparts: usize,
713 ) -> c_long;
714 pub fn MsgSendvnc(
715 __coid: c_int,
716 __siov: *const crate::iovec,
717 __sparts: usize,
718 __riov: *const crate::iovec,
719 __rparts: usize,
720 ) -> c_long;
721 pub fn MsgSendvnc_r(
722 __coid: c_int,
723 __siov: *const crate::iovec,
724 __sparts: usize,
725 __riov: *const crate::iovec,
726 __rparts: usize,
727 ) -> c_long;
728 pub fn MsgReceive(
729 __chid: c_int,
730 __msg: *mut c_void,
731 __bytes: usize,
732 __info: *mut _msg_info64,
733 ) -> c_int;
734 pub fn MsgReceive_r(
735 __chid: c_int,
736 __msg: *mut c_void,
737 __bytes: usize,
738 __info: *mut _msg_info64,
739 ) -> c_int;
740 pub fn MsgReceivev(
741 __chid: c_int,
742 __iov: *const crate::iovec,
743 __parts: usize,
744 __info: *mut _msg_info64,
745 ) -> c_int;
746 pub fn MsgReceivev_r(
747 __chid: c_int,
748 __iov: *const crate::iovec,
749 __parts: usize,
750 __info: *mut _msg_info64,
751 ) -> c_int;
752 pub fn MsgReceivePulse(
753 __chid: c_int,
754 __pulse: *mut c_void,
755 __bytes: usize,
756 __info: *mut _msg_info64,
757 ) -> c_int;
758 pub fn MsgReceivePulse_r(
759 __chid: c_int,
760 __pulse: *mut c_void,
761 __bytes: usize,
762 __info: *mut _msg_info64,
763 ) -> c_int;
764 pub fn MsgReceivePulsev(
765 __chid: c_int,
766 __iov: *const crate::iovec,
767 __parts: usize,
768 __info: *mut _msg_info64,
769 ) -> c_int;
770 pub fn MsgReceivePulsev_r(
771 __chid: c_int,
772 __iov: *const crate::iovec,
773 __parts: usize,
774 __info: *mut _msg_info64,
775 ) -> c_int;
776 pub fn MsgReply(
777 __rcvid: c_int,
778 __status: c_long,
779 __msg: *const c_void,
780 __bytes: usize,
781 ) -> c_int;
782 pub fn MsgReply_r(
783 __rcvid: c_int,
784 __status: c_long,
785 __msg: *const c_void,
786 __bytes: usize,
787 ) -> c_int;
788 pub fn MsgReplyv(
789 __rcvid: c_int,
790 __status: c_long,
791 __iov: *const crate::iovec,
792 __parts: usize,
793 ) -> c_int;
794 pub fn MsgReplyv_r(
795 __rcvid: c_int,
796 __status: c_long,
797 __iov: *const crate::iovec,
798 __parts: usize,
799 ) -> c_int;
800 pub fn MsgReadiov(
801 __rcvid: c_int,
802 __iov: *const crate::iovec,
803 __parts: usize,
804 __offset: usize,
805 __flags: c_int,
806 ) -> isize;
807 pub fn MsgReadiov_r(
808 __rcvid: c_int,
809 __iov: *const crate::iovec,
810 __parts: usize,
811 __offset: usize,
812 __flags: c_int,
813 ) -> isize;
814 pub fn MsgRead(__rcvid: c_int, __msg: *mut c_void, __bytes: usize, __offset: usize) -> isize;
815 pub fn MsgRead_r(__rcvid: c_int, __msg: *mut c_void, __bytes: usize, __offset: usize) -> isize;
816 pub fn MsgReadv(
817 __rcvid: c_int,
818 __iov: *const crate::iovec,
819 __parts: usize,
820 __offset: usize,
821 ) -> isize;
822 pub fn MsgReadv_r(
823 __rcvid: c_int,
824 __iov: *const crate::iovec,
825 __parts: usize,
826 __offset: usize,
827 ) -> isize;
828 pub fn MsgWrite(__rcvid: c_int, __msg: *const c_void, __bytes: usize, __offset: usize)
829 -> isize;
830 pub fn MsgWrite_r(
831 __rcvid: c_int,
832 __msg: *const c_void,
833 __bytes: usize,
834 __offset: usize,
835 ) -> isize;
836 pub fn MsgWritev(
837 __rcvid: c_int,
838 __iov: *const crate::iovec,
839 __parts: usize,
840 __offset: usize,
841 ) -> isize;
842 pub fn MsgWritev_r(
843 __rcvid: c_int,
844 __iov: *const crate::iovec,
845 __parts: usize,
846 __offset: usize,
847 ) -> isize;
848 pub fn MsgSendPulse(__coid: c_int, __priority: c_int, __code: c_int, __value: c_int) -> c_int;
849 pub fn MsgSendPulse_r(__coid: c_int, __priority: c_int, __code: c_int, __value: c_int)
850 -> c_int;
851 pub fn MsgSendPulsePtr(
852 __coid: c_int,
853 __priority: c_int,
854 __code: c_int,
855 __value: *mut c_void,
856 ) -> c_int;
857 pub fn MsgSendPulsePtr_r(
858 __coid: c_int,
859 __priority: c_int,
860 __code: c_int,
861 __value: *mut c_void,
862 ) -> c_int;
863 pub fn MsgDeliverEvent(__rcvid: c_int, __event: *const crate::sigevent) -> c_int;
864 pub fn MsgDeliverEvent_r(__rcvid: c_int, __event: *const crate::sigevent) -> c_int;
865 pub fn MsgVerifyEvent(__rcvid: c_int, __event: *const crate::sigevent) -> c_int;
866 pub fn MsgVerifyEvent_r(__rcvid: c_int, __event: *const crate::sigevent) -> c_int;
867 pub fn MsgRegisterEvent(__event: *mut crate::sigevent, __coid: c_int) -> c_int;
868 pub fn MsgRegisterEvent_r(__event: *mut crate::sigevent, __coid: c_int) -> c_int;
869 pub fn MsgUnregisterEvent(__event: *const crate::sigevent) -> c_int;
870 pub fn MsgUnregisterEvent_r(__event: *const crate::sigevent) -> c_int;
871 pub fn MsgInfo(__rcvid: c_int, __info: *mut _msg_info64) -> c_int;
872 pub fn MsgInfo_r(__rcvid: c_int, __info: *mut _msg_info64) -> c_int;
873 pub fn MsgKeyData(
874 __rcvid: c_int,
875 __oper: c_int,
876 __key: u32,
877 __newkey: *mut u32,
878 __iov: *const crate::iovec,
879 __parts: c_int,
880 ) -> c_int;
881 pub fn MsgKeyData_r(
882 __rcvid: c_int,
883 __oper: c_int,
884 __key: u32,
885 __newkey: *mut u32,
886 __iov: *const crate::iovec,
887 __parts: c_int,
888 ) -> c_int;
889 pub fn MsgError(__rcvid: c_int, __err: c_int) -> c_int;
890 pub fn MsgError_r(__rcvid: c_int, __err: c_int) -> c_int;
891 pub fn MsgCurrent(__rcvid: c_int) -> c_int;
892 pub fn MsgCurrent_r(__rcvid: c_int) -> c_int;
893 pub fn MsgSendAsyncGbl(
894 __coid: c_int,
895 __smsg: *const c_void,
896 __sbytes: usize,
897 __msg_prio: c_uint,
898 ) -> c_int;
899 pub fn MsgSendAsync(__coid: c_int) -> c_int;
900 pub fn MsgReceiveAsyncGbl(
901 __chid: c_int,
902 __rmsg: *mut c_void,
903 __rbytes: usize,
904 __info: *mut _msg_info64,
905 __coid: c_int,
906 ) -> c_int;
907 pub fn MsgReceiveAsync(__chid: c_int, __iov: *const crate::iovec, __parts: c_uint) -> c_int;
908 pub fn MsgPause(__rcvid: c_int, __cookie: c_uint) -> c_int;
909 pub fn MsgPause_r(__rcvid: c_int, __cookie: c_uint) -> c_int;
910
911 pub fn SignalKill(
912 __nd: u32,
913 __pid: crate::pid_t,
914 __tid: c_int,
915 __signo: c_int,
916 __code: c_int,
917 __value: c_int,
918 ) -> c_int;
919 pub fn SignalKill_r(
920 __nd: u32,
921 __pid: crate::pid_t,
922 __tid: c_int,
923 __signo: c_int,
924 __code: c_int,
925 __value: c_int,
926 ) -> c_int;
927 pub fn SignalKillSigval(
928 __nd: u32,
929 __pid: crate::pid_t,
930 __tid: c_int,
931 __signo: c_int,
932 __code: c_int,
933 __value: *const crate::sigval,
934 ) -> c_int;
935 pub fn SignalKillSigval_r(
936 __nd: u32,
937 __pid: crate::pid_t,
938 __tid: c_int,
939 __signo: c_int,
940 __code: c_int,
941 __value: *const crate::sigval,
942 ) -> c_int;
943 pub fn SignalReturn(__info: *mut _sighandler_info) -> c_int;
944 pub fn SignalFault(__sigcode: c_uint, __regs: *mut c_void, __refaddr: usize) -> c_int;
945 pub fn SignalAction(
946 __pid: crate::pid_t,
947 __sigstub: unsafe extern "C" fn(),
948 __signo: c_int,
949 __act: *const crate::sigaction,
950 __oact: *mut crate::sigaction,
951 ) -> c_int;
952 pub fn SignalAction_r(
953 __pid: crate::pid_t,
954 __sigstub: unsafe extern "C" fn(),
955 __signo: c_int,
956 __act: *const crate::sigaction,
957 __oact: *mut crate::sigaction,
958 ) -> c_int;
959 pub fn SignalProcmask(
960 __pid: crate::pid_t,
961 __tid: c_int,
962 __how: c_int,
963 __set: *const crate::sigset_t,
964 __oldset: *mut crate::sigset_t,
965 ) -> c_int;
966 pub fn SignalProcmask_r(
967 __pid: crate::pid_t,
968 __tid: c_int,
969 __how: c_int,
970 __set: *const crate::sigset_t,
971 __oldset: *mut crate::sigset_t,
972 ) -> c_int;
973 pub fn SignalSuspend(__set: *const crate::sigset_t) -> c_int;
974 pub fn SignalSuspend_r(__set: *const crate::sigset_t) -> c_int;
975 pub fn SignalWaitinfo(__set: *const crate::sigset_t, __info: *mut crate::siginfo_t) -> c_int;
976 pub fn SignalWaitinfo_r(__set: *const crate::sigset_t, __info: *mut crate::siginfo_t) -> c_int;
977 pub fn SignalWaitinfoMask(
978 __set: *const crate::sigset_t,
979 __info: *mut crate::siginfo_t,
980 __mask: *const crate::sigset_t,
981 ) -> c_int;
982 pub fn SignalWaitinfoMask_r(
983 __set: *const crate::sigset_t,
984 __info: *mut crate::siginfo_t,
985 __mask: *const crate::sigset_t,
986 ) -> c_int;
987 pub fn ThreadCreate(
988 __pid: crate::pid_t,
989 __func: unsafe extern "C" fn(__arg: *mut c_void) -> *mut c_void,
990 __arg: *mut c_void,
991 __attr: *const crate::_thread_attr,
992 ) -> c_int;
993 pub fn ThreadCreate_r(
994 __pid: crate::pid_t,
995 __func: unsafe extern "C" fn(__arg: *mut c_void) -> *mut c_void,
996 __arg: *mut c_void,
997 __attr: *const crate::_thread_attr,
998 ) -> c_int;
999
1000 pub fn ThreadDestroy(__tid: c_int, __priority: c_int, __status: *mut c_void) -> c_int;
1001 pub fn ThreadDestroy_r(__tid: c_int, __priority: c_int, __status: *mut c_void) -> c_int;
1002 pub fn ThreadDetach(__tid: c_int) -> c_int;
1003 pub fn ThreadDetach_r(__tid: c_int) -> c_int;
1004 pub fn ThreadJoin(__tid: c_int, __status: *mut *mut c_void) -> c_int;
1005 pub fn ThreadJoin_r(__tid: c_int, __status: *mut *mut c_void) -> c_int;
1006 pub fn ThreadCancel(__tid: c_int, __canstub: unsafe extern "C" fn()) -> c_int;
1007 pub fn ThreadCancel_r(__tid: c_int, __canstub: unsafe extern "C" fn()) -> c_int;
1008 pub fn ThreadCtl(__cmd: c_int, __data: *mut c_void) -> c_int;
1009 pub fn ThreadCtl_r(__cmd: c_int, __data: *mut c_void) -> c_int;
1010 pub fn ThreadCtlExt(
1011 __pid: crate::pid_t,
1012 __tid: c_int,
1013 __cmd: c_int,
1014 __data: *mut c_void,
1015 ) -> c_int;
1016 pub fn ThreadCtlExt_r(
1017 __pid: crate::pid_t,
1018 __tid: c_int,
1019 __cmd: c_int,
1020 __data: *mut c_void,
1021 ) -> c_int;
1022
1023 pub fn InterruptHookTrace(
1024 __handler: Option<unsafe extern "C" fn(arg1: c_int) -> *const crate::sigevent>,
1025 __flags: c_uint,
1026 ) -> c_int;
1027 pub fn InterruptHookIdle(
1028 __handler: Option<unsafe extern "C" fn(arg1: *mut u64, arg2: *mut qtime_entry)>,
1029 __flags: c_uint,
1030 ) -> c_int;
1031 pub fn InterruptHookIdle2(
1032 __handler: Option<
1033 unsafe extern "C" fn(arg1: c_uint, arg2: *mut syspage_entry, arg3: *mut _idle_hook),
1034 >,
1035 __flags: c_uint,
1036 ) -> c_int;
1037 pub fn InterruptHookOverdriveEvent(__event: *const crate::sigevent, __flags: c_uint) -> c_int;
1038 pub fn InterruptAttachEvent(
1039 __intr: c_int,
1040 __event: *const crate::sigevent,
1041 __flags: c_uint,
1042 ) -> c_int;
1043 pub fn InterruptAttachEvent_r(
1044 __intr: c_int,
1045 __event: *const crate::sigevent,
1046 __flags: c_uint,
1047 ) -> c_int;
1048 pub fn InterruptAttach(
1049 __intr: c_int,
1050 __handler: Option<
1051 unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const crate::sigevent,
1052 >,
1053 __area: *const c_void,
1054 __size: c_int,
1055 __flags: c_uint,
1056 ) -> c_int;
1057 pub fn InterruptAttach_r(
1058 __intr: c_int,
1059 __handler: Option<
1060 unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const crate::sigevent,
1061 >,
1062 __area: *const c_void,
1063 __size: c_int,
1064 __flags: c_uint,
1065 ) -> c_int;
1066 pub fn InterruptAttachArray(
1067 __intr: c_int,
1068 __handler: Option<
1069 unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const *const crate::sigevent,
1070 >,
1071 __area: *const c_void,
1072 __size: c_int,
1073 __flags: c_uint,
1074 ) -> c_int;
1075 pub fn InterruptAttachArray_r(
1076 __intr: c_int,
1077 __handler: Option<
1078 unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const *const crate::sigevent,
1079 >,
1080 __area: *const c_void,
1081 __size: c_int,
1082 __flags: c_uint,
1083 ) -> c_int;
1084 pub fn InterruptDetach(__id: c_int) -> c_int;
1085 pub fn InterruptDetach_r(__id: c_int) -> c_int;
1086 pub fn InterruptWait(__flags: c_int, __timeout: *const u64) -> c_int;
1087 pub fn InterruptWait_r(__flags: c_int, __timeout: *const u64) -> c_int;
1088 pub fn InterruptCharacteristic(
1089 __type: c_int,
1090 __id: c_int,
1091 __new: *mut c_uint,
1092 __old: *mut c_uint,
1093 ) -> c_int;
1094 pub fn InterruptCharacteristic_r(
1095 __type: c_int,
1096 __id: c_int,
1097 __new: *mut c_uint,
1098 __old: *mut c_uint,
1099 ) -> c_int;
1100
1101 pub fn SchedGet(__pid: crate::pid_t, __tid: c_int, __param: *mut crate::sched_param) -> c_int;
1102 pub fn SchedGet_r(__pid: crate::pid_t, __tid: c_int, __param: *mut crate::sched_param)
1103 -> c_int;
1104 pub fn SchedGetCpuNum() -> c_uint;
1105 pub fn SchedSet(
1106 __pid: crate::pid_t,
1107 __tid: c_int,
1108 __algorithm: c_int,
1109 __param: *const crate::sched_param,
1110 ) -> c_int;
1111 pub fn SchedSet_r(
1112 __pid: crate::pid_t,
1113 __tid: c_int,
1114 __algorithm: c_int,
1115 __param: *const crate::sched_param,
1116 ) -> c_int;
1117 pub fn SchedInfo(
1118 __pid: crate::pid_t,
1119 __algorithm: c_int,
1120 __info: *mut crate::_sched_info,
1121 ) -> c_int;
1122 pub fn SchedInfo_r(
1123 __pid: crate::pid_t,
1124 __algorithm: c_int,
1125 __info: *mut crate::_sched_info,
1126 ) -> c_int;
1127 pub fn SchedYield() -> c_int;
1128 pub fn SchedYield_r() -> c_int;
1129 pub fn SchedCtl(__cmd: c_int, __data: *mut c_void, __length: usize) -> c_int;
1130 pub fn SchedCtl_r(__cmd: c_int, __data: *mut c_void, __length: usize) -> c_int;
1131 pub fn SchedJobCreate(__job: *mut nto_job_t) -> c_int;
1132 pub fn SchedJobCreate_r(__job: *mut nto_job_t) -> c_int;
1133 pub fn SchedJobDestroy(__job: *mut nto_job_t) -> c_int;
1134 pub fn SchedJobDestroy_r(__job: *mut nto_job_t) -> c_int;
1135 pub fn SchedWaypoint(
1136 __job: *mut nto_job_t,
1137 __new: *const i64,
1138 __max: *const i64,
1139 __old: *mut i64,
1140 ) -> c_int;
1141 pub fn SchedWaypoint_r(
1142 __job: *mut nto_job_t,
1143 __new: *const i64,
1144 __max: *const i64,
1145 __old: *mut i64,
1146 ) -> c_int;
1147
1148 pub fn TimerCreate(__id: crate::clockid_t, __notify: *const crate::sigevent) -> c_int;
1149 pub fn TimerCreate_r(__id: crate::clockid_t, __notify: *const crate::sigevent) -> c_int;
1150 pub fn TimerDestroy(__id: crate::timer_t) -> c_int;
1151 pub fn TimerDestroy_r(__id: crate::timer_t) -> c_int;
1152 pub fn TimerSettime(
1153 __id: crate::timer_t,
1154 __flags: c_int,
1155 __itime: *const crate::_itimer,
1156 __oitime: *mut crate::_itimer,
1157 ) -> c_int;
1158 pub fn TimerSettime_r(
1159 __id: crate::timer_t,
1160 __flags: c_int,
1161 __itime: *const crate::_itimer,
1162 __oitime: *mut crate::_itimer,
1163 ) -> c_int;
1164 pub fn TimerInfo(
1165 __pid: crate::pid_t,
1166 __id: crate::timer_t,
1167 __flags: c_int,
1168 __info: *mut crate::_timer_info,
1169 ) -> c_int;
1170 pub fn TimerInfo_r(
1171 __pid: crate::pid_t,
1172 __id: crate::timer_t,
1173 __flags: c_int,
1174 __info: *mut crate::_timer_info,
1175 ) -> c_int;
1176 pub fn TimerAlarm(
1177 __id: crate::clockid_t,
1178 __itime: *const crate::_itimer,
1179 __otime: *mut crate::_itimer,
1180 ) -> c_int;
1181 pub fn TimerAlarm_r(
1182 __id: crate::clockid_t,
1183 __itime: *const crate::_itimer,
1184 __otime: *mut crate::_itimer,
1185 ) -> c_int;
1186 pub fn TimerTimeout(
1187 __id: crate::clockid_t,
1188 __flags: c_int,
1189 __notify: *const crate::sigevent,
1190 __ntime: *const u64,
1191 __otime: *mut u64,
1192 ) -> c_int;
1193 pub fn TimerTimeout_r(
1194 __id: crate::clockid_t,
1195 __flags: c_int,
1196 __notify: *const crate::sigevent,
1197 __ntime: *const u64,
1198 __otime: *mut u64,
1199 ) -> c_int;
1200
1201 pub fn SyncTypeCreate(
1202 __type: c_uint,
1203 __sync: *mut crate::sync_t,
1204 __attr: *const crate::_sync_attr,
1205 ) -> c_int;
1206 pub fn SyncTypeCreate_r(
1207 __type: c_uint,
1208 __sync: *mut crate::sync_t,
1209 __attr: *const crate::_sync_attr,
1210 ) -> c_int;
1211 pub fn SyncDestroy(__sync: *mut crate::sync_t) -> c_int;
1212 pub fn SyncDestroy_r(__sync: *mut crate::sync_t) -> c_int;
1213 pub fn SyncCtl(__cmd: c_int, __sync: *mut crate::sync_t, __data: *mut c_void) -> c_int;
1214 pub fn SyncCtl_r(__cmd: c_int, __sync: *mut crate::sync_t, __data: *mut c_void) -> c_int;
1215 pub fn SyncMutexEvent(__sync: *mut crate::sync_t, event: *const crate::sigevent) -> c_int;
1216 pub fn SyncMutexEvent_r(__sync: *mut crate::sync_t, event: *const crate::sigevent) -> c_int;
1217 pub fn SyncMutexLock(__sync: *mut crate::sync_t) -> c_int;
1218 pub fn SyncMutexLock_r(__sync: *mut crate::sync_t) -> c_int;
1219 pub fn SyncMutexUnlock(__sync: *mut crate::sync_t) -> c_int;
1220 pub fn SyncMutexUnlock_r(__sync: *mut crate::sync_t) -> c_int;
1221 pub fn SyncMutexRevive(__sync: *mut crate::sync_t) -> c_int;
1222 pub fn SyncMutexRevive_r(__sync: *mut crate::sync_t) -> c_int;
1223 pub fn SyncCondvarWait(__sync: *mut crate::sync_t, __mutex: *mut crate::sync_t) -> c_int;
1224 pub fn SyncCondvarWait_r(__sync: *mut crate::sync_t, __mutex: *mut crate::sync_t) -> c_int;
1225 pub fn SyncCondvarSignal(__sync: *mut crate::sync_t, __all: c_int) -> c_int;
1226 pub fn SyncCondvarSignal_r(__sync: *mut crate::sync_t, __all: c_int) -> c_int;
1227 pub fn SyncSemPost(__sync: *mut crate::sync_t) -> c_int;
1228 pub fn SyncSemPost_r(__sync: *mut crate::sync_t) -> c_int;
1229 pub fn SyncSemWait(__sync: *mut crate::sync_t, __tryto: c_int) -> c_int;
1230 pub fn SyncSemWait_r(__sync: *mut crate::sync_t, __tryto: c_int) -> c_int;
1231
1232 pub fn ClockTime(__id: crate::clockid_t, _new: *const u64, __old: *mut u64) -> c_int;
1233 pub fn ClockTime_r(__id: crate::clockid_t, _new: *const u64, __old: *mut u64) -> c_int;
1234 pub fn ClockAdjust(
1235 __id: crate::clockid_t,
1236 _new: *const crate::_clockadjust,
1237 __old: *mut crate::_clockadjust,
1238 ) -> c_int;
1239 pub fn ClockAdjust_r(
1240 __id: crate::clockid_t,
1241 _new: *const crate::_clockadjust,
1242 __old: *mut crate::_clockadjust,
1243 ) -> c_int;
1244 pub fn ClockPeriod(
1245 __id: crate::clockid_t,
1246 _new: *const crate::_clockperiod,
1247 __old: *mut crate::_clockperiod,
1248 __reserved: c_int,
1249 ) -> c_int;
1250 pub fn ClockPeriod_r(
1251 __id: crate::clockid_t,
1252 _new: *const crate::_clockperiod,
1253 __old: *mut crate::_clockperiod,
1254 __reserved: c_int,
1255 ) -> c_int;
1256 pub fn ClockId(__pid: crate::pid_t, __tid: c_int) -> c_int;
1257 pub fn ClockId_r(__pid: crate::pid_t, __tid: c_int) -> c_int;
1258
1259 //
1260 //TODO: The following commented out functions are implemented in assembly.
1261 // We can implmement them either via a C stub or rust's inline assembly.
1262 //
1263 //pub fn InterruptEnable();
1264 //pub fn InterruptDisable();
1265 pub fn InterruptMask(__intr: c_int, __id: c_int) -> c_int;
1266 pub fn InterruptUnmask(__intr: c_int, __id: c_int) -> c_int;
1267 //pub fn InterruptLock(__spin: *mut intrspin);
1268 //pub fn InterruptUnlock(__spin: *mut intrspin);
1269 //pub fn InterruptStatus() -> c_uint;
1270 }