Module KQueue::Native::Flags
In: lib/rb-kqueue/native/flags.rb

A module containing all the C-level integer flags that are used with kqueue.

@private

Methods

Constants

EVFILT_READ = -1   Filters
EVFILT_WRITE = -2
EVFILT_AIO = -3
EVFILT_VNODE = -4
EVFILT_PROC = -5
EVFILT_SIGNAL = -6
EVFILT_TIMER = -7
EVFILT_MACHPORT = -8
EVFILT_FS = -9
EVFILT_USER = -10
EVFILT_SESSION = -11
EV_ADD = 0x0001   Actions
EV_DELETE = 0x0002
EV_ENABLE = 0x0004
EV_DISABLE = 0x0008
EV_RECEIPT = 0x0040
EV_ONESHOT = 0x0010   Flags
EV_CLEAR = 0x0020
EV_DISPATCH = 0x0080
EV_EOF = 0x8000   Returned values
EV_ERROR = 0x4000
NOTE_READ_LOWAT = NOTE_WRITE_LOWAT = 0x00000001   For `EVFILT_{READ,WRITE}`
NOTE_VNODE_DELETE = 0x00000001   For `EVFILT_VNODE`
NOTE_VNODE_WRITE = 0x00000002
NOTE_VNODE_EXTEND = 0x00000004
NOTE_VNODE_ATTRIB = 0x00000008
NOTE_VNODE_LINK = 0x00000010
NOTE_VNODE_RENAME = 0x00000020
NOTE_VNODE_REVOKE = 0x00000040
NOTE_PROC_EXIT = 0x80000000   For `EVFILT_PROC`
NOTE_PROC_FORK = 0x40000000
NOTE_PROC_EXEC = 0x20000000
NOTE_PROC_REAP = 0x10000000
NOTE_PROC_SIGNAL = 0x08000000
NOTE_PROC_TRACK = 0x00000001
NOTE_PROC_TRACKERR = 0x00000002
NOTE_PROC_CHILD = 0x00000004
NOTE_TIMER_SECONDS = 0x00000001   For `EVFILT_TIMER`
NOTE_TIMER_USECONDS = 0x00000002
NOTE_TIMER_NSECONDS = 0x00000004
NOTE_TIMER_ABSOLUTE = 0x00000008

Public Class methods

Converts an integer from the C API into a flag.

@param prefix [String] The prefix for the C names of the flags @param flag [Fixnum] @return [Symbol]

Converts a bitmask from the C API into a list of flags.

@param prefix [String] The prefix for the C names of the flags @param mask [Fixnum] @return [Array<Symbol>]

Converts a flag to the integer that the C API expects.

@param prefix [String] The prefix for the C names of the flags @param flag [Symbol] @return [Fixnum]

Converts a list of flags to the bitmask that the C API expects.

@param prefix [String] The prefix for the C names of the flags @param flags [Array<Symbol>] @return [Fixnum]

[Validate]