aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c/linux.zig
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2023-05-12 22:13:25 +0100
committerVeikka Tuominen <git@vexu.eu>2023-05-13 12:13:02 +0300
commit6f418c11e1ad1150fbdb002cfe1be92bda4e93cb (patch)
tree0fee66a95543b4d13f8a98fad3622deeb4e1eea4 /lib/std/c/linux.zig
parentcceadf52baff2590c1b38c469b1177918183dfe8 (diff)
downloadzig-6f418c11e1ad1150fbdb002cfe1be92bda4e93cb.tar.gz
zig-6f418c11e1ad1150fbdb002cfe1be92bda4e93cb.zip
linux adding some NUMA support
Diffstat (limited to 'lib/std/c/linux.zig')
-rw-r--r--lib/std/c/linux.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig
index 3eeb3bd68b..856d64b21c 100644
--- a/lib/std/c/linux.zig
+++ b/lib/std/c/linux.zig
@@ -371,3 +371,19 @@ 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;