diff options
| author | David CARLIER <devnexen@gmail.com> | 2023-05-13 10:39:10 +0100 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-05-13 21:18:18 +0300 |
| commit | c7bf8bab38f8b89c1371eedb9229e00a29b5ca5b (patch) | |
| tree | 69ab6b3e9fb23e65432aa580e053237d49c67465 /lib/std/c/linux.zig | |
| parent | 46527292178d64daa9f81be3eef378d78d254b5d (diff) | |
| download | zig-c7bf8bab38f8b89c1371eedb9229e00a29b5ca5b.tar.gz zig-c7bf8bab38f8b89c1371eedb9229e00a29b5ca5b.zip | |
std.os: adding linux's sched_setaffinity and its wrapper
Diffstat (limited to 'lib/std/c/linux.zig')
| -rw-r--r-- | lib/std/c/linux.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig index 856d64b21c..eb31248683 100644 --- a/lib/std/c/linux.zig +++ b/lib/std/c/linux.zig @@ -13,6 +13,10 @@ pub const ARCH = linux.ARCH; pub const AT = linux.AT; pub const CLOCK = linux.CLOCK; pub const CPU_COUNT = linux.CPU_COUNT; +pub const CPU_SET = linux.CPU_SET; +pub const CPU_ISSET = linux.CPU_ISSET; +pub const CPU_CLR = linux.CPU_CLR; +pub const CPU_ZERO = linux.CPU_ZERO; pub const E = linux.E; pub const Elf_Symndx = linux.Elf_Symndx; pub const F = linux.F; @@ -245,6 +249,7 @@ pub extern "c" fn setrlimit64(resource: rlimit_resource, rlim: *const rlimit) c_ pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; pub extern "c" fn sched_getaffinity(pid: c_int, size: usize, set: *cpu_set_t) c_int; +pub extern "c" fn sched_setaffinity(pid: c_int, size: usize, set: *const cpu_set_t) c_int; pub extern "c" fn eventfd(initval: c_uint, flags: c_uint) c_int; pub extern "c" fn epoll_ctl(epfd: fd_t, op: c_uint, fd: fd_t, event: ?*epoll_event) c_int; pub extern "c" fn epoll_create1(flags: c_uint) c_int; |
