| author | |
| committer | |
| log | 8678d445c2dfe81918f0958df1d4da314f06db6f |
| tree | 1d0b67b24d8c2d25cb9954bdb36f0212ec9145c1 |
| parent | 182bec87718dda88406575f0dea18bf11954c88c |
This reverts commit 6f418c11e1ad1150fbdb002cfe1be92bda4e93cb.2 files changed, 0 insertions(+), 32 deletions(-)
lib/std/c/linux.zig-16| ... | ... | @@ -371,19 +371,3 @@ pub const dirent64 = struct { |
| 371 | 371 | d_type: u8, |
| 372 | 372 | d_name: [256]u8, |
| 373 | 373 | }; |
| 374 | ||
| 375 | pub const MPOL = struct { | |
| 376 | pub const F_NODE = 1 << 0; | |
| 377 | pub const F_ADDR = 1 << 1; | |
| 378 | pub const F_MEMS_ALLOWED = 1 << 2; | |
| 379 | /// flags for SYS_mbind | |
| 380 | pub const MF_STRICT = 1 << 0; | |
| 381 | pub const MF_MOVE = 1 << 1; | |
| 382 | pub const MF_MOVE_ALL = 1 << 2; | |
| 383 | pub const MF_LAZY = 1 << 3; | |
| 384 | pub const MF_INTERNAL = 1 << 4; | |
| 385 | pub const MF_VALID = MPOL.MF_STRICT | MPOL.MF_MOVE | MPOL.MOVE_ALL; | |
| 386 | }; | |
| 387 | ||
| 388 | pub extern "c" fn getcpu(cpu: *c_uint, node: *c_uint) c_int; | |
| 389 | pub extern "c" fn sched_getcpu() c_int; |
lib/std/os/linux.zig-16| ... | ... | @@ -1520,22 +1520,6 @@ pub fn sched_getaffinity(pid: pid_t, size: usize, set: *cpu_set_t) usize { |
| 1520 | 1520 | return 0; |
| 1521 | 1521 | } |
| 1522 | 1522 | |
| 1523 | pub fn getcpu(cpu: *u32, node: *u32) usize { | |
| 1524 | return syscall3(.getcpu, @intFromPtr(cpu), @intFromPtr(node), 0); | |
| 1525 | } | |
| 1526 | ||
| 1527 | pub fn sched_getcpu() usize { | |
| 1528 | var cpu: u32 = undefined; | |
| 1529 | const rc = syscall3(.getcpu, @intFromPtr(&cpu), 0, 0); | |
| 1530 | if (@as(isize, @bitCast(rc)) < 0) return rc; | |
| 1531 | return @as(usize, @intCast(cpu)); | |
| 1532 | } | |
| 1533 | ||
| 1534 | /// libc has no wrapper for this syscall | |
| 1535 | pub fn mbind(addr: ?*anyopaque, len: u32, mode: i32, nodemask: *const u32, maxnode: u32, flags: u32) usize { | |
| 1536 | return syscall6(.mbind, @intFromPtr(addr), len, @as(usize, @bitCast(@as(isize, mode))), @intFromPtr(nodemask), maxnode, flags); | |
| 1537 | } | |
| 1538 | ||
| 1539 | 1523 | pub fn epoll_create() usize { |
| 1540 | 1524 | return epoll_create1(0); |
| 1541 | 1525 | } |