Debian Codegraph @

libgrust/libformat_parser/vendor/libc/src/unix/nto/neutrino.rs

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