Source
pub const MSF = switch (native_os) {
.linux => linux.MSF,
.emscripten => emscripten.MSF,
.macos, .ios, .tvos, .watchos, .visionos => struct {
pub const ASYNC = 0x1;
pub const INVALIDATE = 0x2;
/// invalidate, leave mapped
pub const KILLPAGES = 0x4;
/// deactivate, leave mapped
pub const DEACTIVATE = 0x8;
pub const SYNC = 0x10;
},
.openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd => struct {
pub const ASYNC = 1;
pub const INVALIDATE = 2;
pub const SYNC = 4;
},
// https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L50-L52
.serenity => struct {
pub const SYNC = 1;
pub const ASYNC = 2;
pub const INVALIDATE = 4;
},
else => void,
}