Skip to content

Commit 8d88dcd

Browse files
devnexenandrewrk
authored andcommitted
std.c: adding mincore for freebsd
1 parent f780a6b commit 8d88dcd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/std/c/freebsd.zig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,3 +2273,21 @@ pub const sigevent = extern struct {
22732273
__spare__: [8]c_long,
22742274
},
22752275
};
2276+
2277+
pub const MIN = struct {
2278+
pub const INCORE = 0x1;
2279+
pub const REFERENCED = 0x2;
2280+
pub const MODIFIED = 0x4;
2281+
pub const REFERENCED_OTHER = 0x8;
2282+
pub const MODIFIED_OTHER = 0x10;
2283+
pub const SUPER = 0x60;
2284+
pub fn PSIND(i: u32) u32 {
2285+
return (i << 5) & SUPER;
2286+
}
2287+
};
2288+
2289+
pub extern "c" fn mincore(
2290+
addr: *align(std.mem.page_size) const anyopaque,
2291+
length: usize,
2292+
vec: [*]u8,
2293+
) c_int;

0 commit comments

Comments
 (0)