1use crate::ffi::{c_uchar, clock_t};
4
5use crate::port::mach_port_t;
6
7pub type task_t = mach_port_t;
8pub type task_name_t = mach_port_t;
9pub type task_suspension_token_t = mach_port_t;
10pub type thread_t = mach_port_t;
11pub type thread_act_t = mach_port_t;
12pub type ipc_space_t = mach_port_t;
13pub type coalition_t = mach_port_t;
14pub type host_t = mach_port_t;
15pub type host_priv_t = mach_port_t;
16pub type host_security_t = mach_port_t;
17pub type processor_t = mach_port_t;
18pub type processor_set_t = mach_port_t;
19pub type processor_set_control_t = mach_port_t;
20pub type semaphore_t = mach_port_t;
21pub type lock_set_t = mach_port_t;
22pub type ledger_t = mach_port_t;
23pub type alarm_t = mach_port_t;
24pub type clock_serv_t = mach_port_t;
25pub type clock_ctrl_t = mach_port_t;
26
27pub type processor_set_name_t = processor_set_t;
28
29pub type clock_reply_t = mach_port_t;
30pub type bootstrap_t = mach_port_t;
31pub type mem_entry_name_port_t = mach_port_t;
32pub type exception_handler_t = mach_port_t;
33pub type exception_handler_array_t = *mut exception_handler_t;
34pub type vm_task_entry_t = mach_port_t;
35pub type io_master_t = mach_port_t;
36pub type UNDServerRef = mach_port_t;
37
38pub type task_array_t = *mut task_t;
39pub type thread_array_t = *mut thread_t;
40pub type processor_set_array_t = *mut processor_set_t;
41pub type processor_set_name_array_t = *mut processor_set_t;
42pub type processor_array_t = *mut processor_t;
43pub type thread_act_array_t = *mut thread_act_t;
44pub type ledger_array_t = *mut ledger_t;
45
46pub type task_port_t = task_t;
47pub type task_port_array_t = task_array_t;
48pub type thread_port_t = thread_t;
49pub type thread_port_array_t = thread_array_t;
50pub type ipc_space_port_t = ipc_space_t;
51pub type host_name_t = host_t;
52pub type host_name_port_t = host_t;
53pub type processor_set_port_t = processor_set_t;
54pub type processor_set_name_port_t = processor_set_t;
55pub type processor_set_name_port_array_t = processor_set_array_t;
56pub type processor_set_control_port_t = processor_set_t;
57pub type processor_port_t = processor_t;
58pub type processor_port_array_t = processor_array_t;
59pub type thread_act_port_t = thread_act_t;
60pub type thread_act_port_array_t = thread_act_array_t;
61pub type semaphore_port_t = semaphore_t;
62pub type lock_set_port_t = lock_set_t;
63pub type ledger_port_t = ledger_t;
64pub type ledger_port_array_t = ledger_array_t;
65pub type alarm_port_t = alarm_t;
66pub type clock_serv_port_t = clock_serv_t;
67pub type clock_ctrl_port_t = clock_ctrl_t;
68pub type exception_port_t = exception_handler_t;
69pub type exception_port_arrary_t = exception_handler_array_t;
70
71pub const TASK_NULL: task_t = 0;
72pub const TASK_NAME_NULL: task_name_t = 0;
73pub const THREAD_NULL: thread_t = 0;
74pub const TID_NULL: u64 = 0;
75pub const THR_ACT_NULL: thread_act_t = 0;
76pub const IPC_SPACE_NULL: ipc_space_t = 0;
77pub const COALITION_NULL: coalition_t = 0;
78pub const HOST_NULL: host_t = 0;
79pub const HOST_PRIV_NULL: host_priv_t = 0;
80pub const HOST_SECURITY_NULL: host_security_t = 0;
81pub const PROCESSOR_SET_NULL: processor_set_t = 0;
82pub const PROCESSOR_NULL: processor_t = 0;
83pub const SEMAPHORE_NULL: semaphore_t = 0;
84pub const LOCK_SET_NULL: lock_set_t = 0;
85pub const LEDGER_NULL: ledger_t = 0;
86pub const ALARM_NULL: alarm_t = 0;
87pub const CLOCK_NULL: clock_t = 0;
88pub const UND_SERVER_NULL: UNDServerRef = 0;
89
90pub type uuid_t = [c_uchar; 16];
92
93#[repr(C)]
95#[derive(Copy, Clone, Debug, Default, Hash, PartialOrd, PartialEq, Eq, Ord)]
96pub struct fsid_t {
97 pub val: [i32; 2],
98}
99pub type fsid = fsid_t;
100
101#[repr(C)]
103#[derive(Copy, Clone, Debug, Default, Hash, PartialOrd, PartialEq, Eq, Ord)]
104pub struct fsobj_id_t {
105 pub fid_objno: u32,
106 pub fid_generation: u32,
107}
108pub type fsobj_id = fsobj_id_t;
109