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