Commit 8d88dcdc61

David CARLIER <devnexen@gmail.com>
2023-04-23 01:47:29
std.c: adding mincore for freebsd
1 parent f780a6b
Changed files (1)
lib
lib/std/c/freebsd.zig
@@ -2273,3 +2273,21 @@ pub const sigevent = extern struct {
         __spare__: [8]c_long,
     },
 };
+
+pub const MIN = struct {
+    pub const INCORE = 0x1;
+    pub const REFERENCED = 0x2;
+    pub const MODIFIED = 0x4;
+    pub const REFERENCED_OTHER = 0x8;
+    pub const MODIFIED_OTHER = 0x10;
+    pub const SUPER = 0x60;
+    pub fn PSIND(i: u32) u32 {
+        return (i << 5) & SUPER;
+    }
+};
+
+pub extern "c" fn mincore(
+    addr: *align(std.mem.page_size) const anyopaque,
+    length: usize,
+    vec: [*]u8,
+) c_int;