| ... | @@ -70,6 +70,22 @@ pub extern "c" fn mach_timebase_info(tinfo: ?*mach_timebase_info_data) kern_retu | ... | @@ -70,6 +70,22 @@ pub extern "c" fn mach_timebase_info(tinfo: ?*mach_timebase_info_data) kern_retu |
| 70 | pub extern "c" fn malloc_size(?*const anyopaque) usize; | 70 | pub extern "c" fn malloc_size(?*const anyopaque) usize; |
| 71 | pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int; | 71 | pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int; |
| 72 | | 72 | |
| | 73 | pub const posix_spawnattr_t = *opaque {}; |
| | 74 | pub const posix_spawn_file_actions_t = *opaque {}; |
| | 75 | pub extern "c" fn posix_spawnattr_init(attr: *posix_spawnattr_t) c_int; |
| | 76 | pub extern "c" fn posix_spawnattr_destroy(attr: *posix_spawnattr_t) void; |
| | 77 | pub extern "c" fn posix_spawnattr_setflags(attr: *posix_spawnattr_t, flags: c_short) c_int; |
| | 78 | pub extern "c" fn posix_spawn_file_actions_init(actions: *posix_spawn_file_actions_t) c_int; |
| | 79 | pub extern "c" fn posix_spawn_file_actions_destroy(actions: *posix_spawn_file_actions_t) void; |
| | 80 | pub extern "c" fn posix_spawnp( |
| | 81 | pid: *pid_t, |
| | 82 | path: [*:0]const u8, |
| | 83 | actions: ?*const posix_spawn_file_actions_t, |
| | 84 | attr: *const posix_spawnattr_t, |
| | 85 | argv: [*][*:0]const u8, |
| | 86 | env: [*][*:0]const u8, |
| | 87 | ) c_int; |
| | 88 | |
| 73 | pub extern "c" fn kevent64( | 89 | pub extern "c" fn kevent64( |
| 74 | kq: c_int, | 90 | kq: c_int, |
| 75 | changelist: [*]const kevent64_s, | 91 | changelist: [*]const kevent64_s, |
| ... | @@ -107,6 +123,24 @@ pub extern "c" fn @"close$NOCANCEL"(fd: fd_t) c_int; | ... | @@ -107,6 +123,24 @@ pub extern "c" fn @"close$NOCANCEL"(fd: fd_t) c_int; |
| 107 | pub extern "c" fn mach_host_self() mach_port_t; | 123 | pub extern "c" fn mach_host_self() mach_port_t; |
| 108 | pub extern "c" fn clock_get_time(clock_serv: clock_serv_t, cur_time: *mach_timespec_t) kern_return_t; | 124 | pub extern "c" fn clock_get_time(clock_serv: clock_serv_t, cur_time: *mach_timespec_t) kern_return_t; |
| 109 | | 125 | |
| | 126 | pub const vm_map_t = mach_port_t; |
| | 127 | pub const mach_vm_address_t = usize; |
| | 128 | pub const vm_offset_t = usize; |
| | 129 | pub const mach_msg_type_number_t = natural_t; |
| | 130 | |
| | 131 | extern "c" var mach_task_self_: mach_port_t; |
| | 132 | pub fn mach_task_self() callconv(.C) mach_port_t { |
| | 133 | return mach_task_self_; |
| | 134 | } |
| | 135 | |
| | 136 | pub extern "c" fn task_for_pid(target_tport: mach_port_name_t, pid: pid_t, t: *mach_port_name_t) kern_return_t; |
| | 137 | pub extern "c" fn mach_vm_write( |
| | 138 | target_task: vm_map_t, |
| | 139 | address: mach_vm_address_t, |
| | 140 | data: vm_offset_t, |
| | 141 | data_cnt: mach_msg_type_number_t, |
| | 142 | ) kern_return_t; |
| | 143 | |
| 110 | pub const sf_hdtr = extern struct { | 144 | pub const sf_hdtr = extern struct { |
| 111 | headers: [*]const iovec_const, | 145 | headers: [*]const iovec_const, |
| 112 | hdr_cnt: c_int, | 146 | hdr_cnt: c_int, |
| ... | @@ -2006,3 +2040,14 @@ pub const CPUFAMILY = enum(u32) { | ... | @@ -2006,3 +2040,14 @@ pub const CPUFAMILY = enum(u32) { |
| 2006 | ARM_FIRESTORM_ICESTORM = 0x1b588bb3, | 2040 | ARM_FIRESTORM_ICESTORM = 0x1b588bb3, |
| 2007 | _, | 2041 | _, |
| 2008 | }; | 2042 | }; |
| | 2043 | |
| | 2044 | pub const POSIX_SPAWN_RESETIDS: c_int = 0x0001; |
| | 2045 | pub const POSIX_SPAWN_SETPGROUP: c_int = 0x0002; |
| | 2046 | pub const POSIX_SPAWN_SETSIGDEF: c_int = 0x0004; |
| | 2047 | pub const POSIX_SPAWN_SETSIGMASK: c_int = 0x0008; |
| | 2048 | pub const POSIX_SPAWN_SETEXEC: c_int = 0x0040; |
| | 2049 | pub const POSIX_SPAWN_START_SUSPENDED: c_int = 0x0080; |
| | 2050 | pub const _POSIX_SPAWN_DISABLE_ASLR: c_int = 0x0100; |
| | 2051 | pub const POSIX_SPAWN_SETSID: c_int = 0x0400; |
| | 2052 | pub const _POSIX_SPAWN_RESLIDE: c_int = 0x0800; |
| | 2053 | pub const POSIX_SPAWN_CLOEXEC_DEFAULT: c_int = 0x4000; |