Type Flock [src]

Source

pub const Flock = switch (native_os) { .linux => linux.Flock, .emscripten => emscripten.Flock, .openbsd, .dragonfly, .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { start: off_t, len: off_t, pid: pid_t, type: i16, whence: i16, }, .freebsd => extern struct { /// Starting offset. start: off_t, /// Number of consecutive bytes to be locked. /// A value of 0 means to the end of the file. len: off_t, /// Lock owner. pid: pid_t, /// Lock type. type: i16, /// Type of the start member. whence: i16, /// Remote system id or zero for local. sysid: i32, }, .solaris, .illumos => extern struct { type: c_short, whence: c_short, start: off_t, // len == 0 means until end of file. len: off_t, sysid: c_int, pid: pid_t, __pad: [4]c_long, }, .haiku => extern struct { type: i16, whence: i16, start: off_t, len: off_t, pid: pid_t, }, // https://github.com/SerenityOS/serenity/blob/2808b0376406a40e31293bb3bcb9170374e90506/Kernel/API/POSIX/fcntl.h#L54-L60 .serenity => extern struct { type: c_short, whence: c_short, start: off_t, len: off_t, pid: pid_t, }, else => void, }