authorgravatar for borrelli.gabriel.pr@gmail.comGabriel Borrelli <borrelli.gabriel.pr@gmail.com> 2025-02-19 23:53:31+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-20 20:42:24+01:00
log8e293ea8bd7fb7f6161604e9e4f4c21525d68827
treebc4e1169a4037a11995a16a04b0ba1d870d9f2d6
parentdbc886fd04328391598880c8d5abe8443b514a02

std.c: define MADV for darwin


1 files changed, 14 insertions(+), 0 deletions(-)

lib/std/c.zig+14
......@@ -1360,6 +1360,20 @@ pub const KERN = switch (native_os) {
13601360pub const MADV = switch (native_os) {
13611361 .linux => linux.MADV,
13621362 .emscripten => emscripten.MADV,
1363 .macos, .ios, .tvos, .watchos, .visionos => struct {
1364 pub const NORMAL = 0;
1365 pub const RANDOM = 1;
1366 pub const SEQUENTIAL = 2;
1367 pub const WILLNEED = 3;
1368 pub const DONTNEED = 4;
1369 pub const FREE = 5;
1370 pub const ZERO_WIRED_PAGES = 6;
1371 pub const FREE_REUSABLE = 7;
1372 pub const FREE_REUSE = 8;
1373 pub const CAN_REUSE = 9;
1374 pub const PAGEOUT = 10;
1375 pub const ZERO = 11;
1376 },
13631377 .freebsd => struct {
13641378 pub const NORMAL = 0;
13651379 pub const RANDOM = 1;