mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 09:03:12 +00:00
Revert "linux adding some NUMA support"
This reverts commit 6f418c11e1
.
This commit is contained in:
parent
182bec8771
commit
8678d445c2
@ -371,19 +371,3 @@ pub const dirent64 = struct {
|
||||
d_type: u8,
|
||||
d_name: [256]u8,
|
||||
};
|
||||
|
||||
pub const MPOL = struct {
|
||||
pub const F_NODE = 1 << 0;
|
||||
pub const F_ADDR = 1 << 1;
|
||||
pub const F_MEMS_ALLOWED = 1 << 2;
|
||||
/// flags for SYS_mbind
|
||||
pub const MF_STRICT = 1 << 0;
|
||||
pub const MF_MOVE = 1 << 1;
|
||||
pub const MF_MOVE_ALL = 1 << 2;
|
||||
pub const MF_LAZY = 1 << 3;
|
||||
pub const MF_INTERNAL = 1 << 4;
|
||||
pub const MF_VALID = MPOL.MF_STRICT | MPOL.MF_MOVE | MPOL.MOVE_ALL;
|
||||
};
|
||||
|
||||
pub extern "c" fn getcpu(cpu: *c_uint, node: *c_uint) c_int;
|
||||
pub extern "c" fn sched_getcpu() c_int;
|
||||
|
@ -1520,22 +1520,6 @@ pub fn sched_getaffinity(pid: pid_t, size: usize, set: *cpu_set_t) usize {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pub fn getcpu(cpu: *u32, node: *u32) usize {
|
||||
return syscall3(.getcpu, @intFromPtr(cpu), @intFromPtr(node), 0);
|
||||
}
|
||||
|
||||
pub fn sched_getcpu() usize {
|
||||
var cpu: u32 = undefined;
|
||||
const rc = syscall3(.getcpu, @intFromPtr(&cpu), 0, 0);
|
||||
if (@as(isize, @bitCast(rc)) < 0) return rc;
|
||||
return @as(usize, @intCast(cpu));
|
||||
}
|
||||
|
||||
/// libc has no wrapper for this syscall
|
||||
pub fn mbind(addr: ?*anyopaque, len: u32, mode: i32, nodemask: *const u32, maxnode: u32, flags: u32) usize {
|
||||
return syscall6(.mbind, @intFromPtr(addr), len, @as(usize, @bitCast(@as(isize, mode))), @intFromPtr(nodemask), maxnode, flags);
|
||||
}
|
||||
|
||||
pub fn epoll_create() usize {
|
||||
return epoll_create1(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user