package core:sys/kqueue

Warning: This was generated for -target:darwin_arm64 and might not represent every target this package supports.

⌘K
Ctrl+K
or
/

    Index

    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedures (2)
    Procedure Groups (0)

    This section is empty.

    Types

    Filter ¶

    Filter :: enum _Filter_Backing {
    	Read   = -1, // Check for read availability on the file descriptor.
    	Write  = -2, // Check for write availability on the file descriptor.
    	AIO    = -3, // Attached to AIO requests.
    	VNode  = -4, // Check for changes to the subject file.
    	Proc   = -5, // Check for changes to the subject process.
    	Signal = -6, // Check for signals delivered to the process.
    	Timer  = -7, // Timers.
    }

    Flag ¶

    Flag :: enum _Flags_Backing {
    	Add      = 0,  // Add event to kq (implies .Enable).
    	Delete   = 1,  // Delete event from kq.
    	Enable   = 2,  // Enable event.
    	Disable  = 3,  // Disable event (not reported).
    	One_Shot = 4,  // Only report one occurrence.
    	Clear    = 5,  // Clear event state after reporting.
    	Receipt  = 6,  // Force immediate event output.
    	Dispatch = 7,  // Disable event after reporting.
    	Error    = 14, // Error, data contains errno.
    	EOF      = 15, // EOF detected.
    }

    Flags ¶

    Flags :: bit_set[Flag; _Flags_Backing]

    KEvent ¶

    KEvent :: struct #align (4) {
    	// Value used to identify this event. The exact interpretation is determined by the attached filter.
    	ident:  uintptr,
    	// Filter for event.
    	filter: Filter,
    	// General flags.
    	flags:  bit_set[Flag; _Flags_Backing],
    	// Filter specific flags.
    	fflags: struct #raw_union {
    		rw:    bit_set[RW_Flag; u32],
    		vnode: bit_set[VNode_Flag; u32],
    		fproc: bit_set[Proc_Flag; u32],
    		// vm:    VM_Flags,
    		timer: bit_set[Timer_Flag; u32],
    	},
    	// Filter specific data.
    	data:   i64,
    	// Opaque user data passed through the kernel unchanged.
    	udata:  rawptr,
    }

    KQ ¶

    KQ :: posix.FD

    Proc_Flag ¶

    Proc_Flag :: enum u32 {
    	Exit   = 31, // Process exited.
    	Fork   = 30, // Process forked.
    	Exec   = 29, // Process exec'd.
    	Signal = 27, // Shared with `Filter.Signal`.
    }

    Proc_Flags ¶

    Proc_Flags :: bit_set[Proc_Flag; u32]

    RW_Flag ¶

    RW_Flag :: enum u32 {
    	Low_Water_Mark = 0, 
    }

    RW_Flags ¶

    RW_Flags :: bit_set[RW_Flag; u32]

    Timer_Flag ¶

    Timer_Flag :: enum u32 {
    	Seconds  = 0, // Data is seconds.
    	USeconds = 1, // Data is microseconds.
    	NSeconds = 2, // Data is nanoseconds.
    	Absolute = 3, // Absolute timeout.
    }

    Timer_Flags ¶

    Timer_Flags :: bit_set[Timer_Flag; u32]

    VNode_Flag ¶

    VNode_Flag :: enum u32 {
    	Delete = 0, // Deleted.
    	Write  = 1, // Contents changed.
    	Extend = 2, // Size increased.
    	Attrib = 3, // Attributes changed.
    	Link   = 4, // Link count changed.
    	Rename = 5, // Renamed.
    	Revoke = 6, // Access was revoked.
    }

    VNode_Flags ¶

    VNode_Flags :: bit_set[VNode_Flag; u32]

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    kevent ¶

    kevent :: proc(kq: posix.FD, change_list: []KEvent, event_list: []KEvent, timeout: ^libc.timespec) -> (n_events: i32, err: posix.Errno) {…}

    kqueue ¶

    kqueue :: proc() -> (kq: posix.FD, err: posix.Errno) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-17 21:11:01.317477300 +0000 UTC