| ... | @@ -5,21 +5,12 @@ const maxInt = std.math.maxInt; | ... | @@ -5,21 +5,12 @@ const maxInt = std.math.maxInt; |
| 5 | const iovec = std.os.iovec; | 5 | const iovec = std.os.iovec; |
| 6 | const iovec_const = std.os.iovec_const; | 6 | const iovec_const = std.os.iovec_const; |
| 7 | | 7 | |
| 8 | pub const CPU_SETSIZE = 256; | | |
| 9 | pub const cpuset_t = extern struct { | | |
| 10 | __bits: [(CPU_SETSIZE + (@bitSizeOf(c_long) - 1)) / @bitSizeOf(c_long)]c_long, | | |
| 11 | }; | | |
| 12 | pub const cpulevel_t = c_int; | | |
| 13 | pub const cpuwhich_t = c_int; | | |
| 14 | pub const id_t = i64; | | |
| 15 | | | |
| 16 | extern "c" fn __error() *c_int; | 8 | extern "c" fn __error() *c_int; |
| 17 | pub const _errno = __error; | 9 | pub const _errno = __error; |
| 18 | | 10 | |
| 19 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) isize; | 11 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) isize; |
| 20 | pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; | 12 | pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; |
| 21 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; | 13 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; |
| 22 | pub extern "c" fn getentropy(buf_ptr: [*]u8, buf_len: usize) c_int; | | |
| 23 | | 14 | |
| 24 | pub extern "c" fn pthread_getthreadid_np() c_int; | 15 | pub extern "c" fn pthread_getthreadid_np() c_int; |
| 25 | pub extern "c" fn pthread_set_name_np(thread: std.c.pthread_t, name: [*:0]const u8) void; | 16 | pub extern "c" fn pthread_set_name_np(thread: std.c.pthread_t, name: [*:0]const u8) void; |
| ... | @@ -35,9 +26,6 @@ pub extern "c" fn getpid() pid_t; | ... | @@ -35,9 +26,6 @@ pub extern "c" fn getpid() pid_t; |
| 35 | pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file; | 26 | pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file; |
| 36 | pub extern "c" fn kinfo_getvmmap(pid: pid_t, cntp: *c_int) ?[*]kinfo_vmentry; | 27 | pub extern "c" fn kinfo_getvmmap(pid: pid_t, cntp: *c_int) ?[*]kinfo_vmentry; |
| 37 | | 28 | |
| 38 | pub extern "c" fn cpuset_getaffinity(level: cpulevel_t, which: cpuwhich_t, id: id_t, setsize: usize, mask: *cpuset_t) c_int; | | |
| 39 | pub extern "c" fn cpuset_setaffinity(level: cpulevel_t, which: cpuwhich_t, id: id_t, setsize: usize, mask: *const cpuset_t) c_int; | | |
| 40 | | | |
| 41 | pub const sf_hdtr = extern struct { | 29 | pub const sf_hdtr = extern struct { |
| 42 | headers: [*]const iovec_const, | 30 | headers: [*]const iovec_const, |
| 43 | hdr_cnt: c_int, | 31 | hdr_cnt: c_int, |
| ... | @@ -215,6 +203,8 @@ pub const clock_t = isize; | ... | @@ -215,6 +203,8 @@ pub const clock_t = isize; |
| 215 | pub const socklen_t = u32; | 203 | pub const socklen_t = u32; |
| 216 | pub const suseconds_t = c_long; | 204 | pub const suseconds_t = c_long; |
| 217 | | 205 | |
| | 206 | pub const id_t = i64; |
| | 207 | |
| 218 | /// Renamed from `kevent` to `Kevent` to avoid conflict with function name. | 208 | /// Renamed from `kevent` to `Kevent` to avoid conflict with function name. |
| 219 | pub const Kevent = extern struct { | 209 | pub const Kevent = extern struct { |
| 220 | /// Identifier for this event. | 210 | /// Identifier for this event. |