Type Kevent [src]

Renamed from kevent to Kevent to avoid conflict with function name.

Source

pub const Kevent = switch (native_os) { .netbsd => extern struct { ident: usize, filter: i32, flags: u32, fflags: u32, data: i64, udata: usize, }, .macos, .ios, .tvos, .watchos, .visionos => extern struct { ident: usize, filter: i16, flags: u16, fflags: u32, data: isize, udata: usize, // sys/types.h on macos uses #pragma pack(4) so these checks are // to make sure the struct is laid out the same. These values were // produced from C code using the offsetof macro. comptime { assert(@offsetOf(@This(), "ident") == 0); assert(@offsetOf(@This(), "filter") == 8); assert(@offsetOf(@This(), "flags") == 10); assert(@offsetOf(@This(), "fflags") == 12); assert(@offsetOf(@This(), "data") == 16); assert(@offsetOf(@This(), "udata") == 24); } }, .freebsd => extern struct { /// Identifier for this event. ident: usize, /// Filter for event. filter: i16, /// Action flags for kqueue. flags: u16, /// Filter flag value. fflags: u32, /// Filter data value. data: i64, /// Opaque user data identifier. udata: usize, /// Future extensions. _ext: [4]u64 = [_]u64{0} ** 4, }, .dragonfly => extern struct { ident: usize, filter: c_short, flags: c_ushort, fflags: c_uint, data: isize, udata: usize, }, .openbsd => extern struct { ident: usize, filter: c_short, flags: u16, fflags: c_uint, data: i64, udata: usize, }, else => void, }