authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:02:43-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:02:43-07:00
log8678d445c2dfe81918f0958df1d4da314f06db6f
tree1d0b67b24d8c2d25cb9954bdb36f0212ec9145c1
parent182bec87718dda88406575f0dea18bf11954c88c

Revert "linux adding some NUMA support"

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 {
371371 d_type: u8,
372372 d_name: [256]u8,
373373};
374
375pub 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
388pub extern "c" fn getcpu(cpu: *c_uint, node: *c_uint) c_int;
389pub 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 {
15201520 return 0;
15211521}
15221522
1523pub fn getcpu(cpu: *u32, node: *u32) usize {
1524 return syscall3(.getcpu, @intFromPtr(cpu), @intFromPtr(node), 0);
1525}
1526
1527pub 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
1535pub 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
15391523pub fn epoll_create() usize {
15401524 return epoll_create1(0);
15411525}