Zig 0.17.0-dev (Split by item)
This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig library itself.
Zig › std/ › c.zig › MADV
MADV
c.MADV
pub const MADV = switch (native_os )
File
Code
pub const MADV = switch (native_os ) {
.linux => linux .MADV ,
.emscripten => emscripten .MADV ,
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => struct {
pub const NORMAL = 0 ;
pub const RANDOM = 1 ;
pub const SEQUENTIAL = 2 ;
pub const WILLNEED = 3 ;
pub const DONTNEED = 4 ;
pub const FREE = 5 ;
pub const ZERO_WIRED_PAGES = 6 ;
pub const FREE_REUSABLE = 7 ;
pub const FREE_REUSE = 8 ;
pub const CAN_REUSE = 9 ;
pub const PAGEOUT = 10 ;
pub const ZERO = 11 ;
},
.freebsd => struct {
pub const NORMAL = 0 ;
pub const RANDOM = 1 ;
pub const SEQUENTIAL = 2 ;
pub const WILLNEED = 3 ;
pub const DONTNEED = 4 ;
pub const FREE = 5 ;
pub const NOSYNC = 6 ;
pub const AUTOSYNC = 7 ;
pub const NOCORE = 8 ;
pub const CORE = 9 ;
pub const PROTECT = 10 ;
},
.illumos => struct {
pub const NORMAL = 0 ;
pub const RANDOM = 1 ;
pub const SEQUENTIAL = 2 ;
pub const WILLNEED = 3 ;
pub const DONTNEED = 4 ;
pub const FREE = 5 ;
pub const ACCESS_DEFAULT = 6 ;
pub const ACCESS_LWP = 7 ;
pub const ACCESS_MANY = 8 ;
pub const PURGE = 9 ;
},
.dragonfly => struct {
pub const SEQUENTIAL = 2 ;
pub const CONTROL_END = SETMAP ;
pub const DONTNEED = 4 ;
pub const RANDOM = 1 ;
pub const WILLNEED = 3 ;
pub const NORMAL = 0 ;
pub const CONTROL_START = INVAL ;
pub const FREE = 5 ;
pub const NOSYNC = 6 ;
pub const AUTOSYNC = 7 ;
pub const NOCORE = 8 ;
pub const CORE = 9 ;
pub const INVAL = 10 ;
pub const SETMAP = 11 ;
},
.serenity => struct {
pub const NORMAL = 0x0 ;
pub const SET_VOLATILE = 0x1 ;
pub const SET_NONVOLATILE = 0x2 ;
pub const DONTNEED = 0x3 ;
pub const WILLNEED = 0x4 ;
pub const SEQUENTIAL = 0x5 ;
pub const RANDOM = 0x6 ;
},
.netbsd , .openbsd => struct {
pub const NORMAL = 0 ;
pub const RANDOM = 1 ;
pub const SEQUENTIAL = 2 ;
pub const WILLNEED = 3 ;
pub const DONTNEED = 4 ;
pub const SPACEAVAIL = 5 ;
pub const FREE = 6 ;
},
else => void ,
}