public abstract class BSD extends Unix
Modifier and Type | Class and Description |
---|---|
static class |
BSD.kevent
struct kevent {
uintptr_t ident; // identifier for this event
short filter; // filter for event
u_short flags; // action flags for kqueue
u_int fflags; // filter flag value
intptr_t data; // filter data value
void *udata; // opaque user data identifier
};
|
Unix.timespec
Modifier and Type | Field and Description |
---|---|
static short |
EV_ADD |
static short |
EV_CLEAR |
static short |
EV_DELETE |
static short |
EV_DISABLE |
static short |
EV_ENABLE |
static short |
EV_EOF |
static short |
EV_ERROR |
static short |
EV_ONESHOT |
static short |
EVFILT_PROC |
static short |
EVFILT_VNODE |
static int |
NOTE_ATTRIB |
static int |
NOTE_DELETE |
static int |
NOTE_EXEC |
static int |
NOTE_EXIT |
static int |
NOTE_EXTEND |
static int |
NOTE_FORK |
static int |
NOTE_LINK |
static int |
NOTE_RENAME |
static int |
NOTE_REVOKE |
static int |
NOTE_TRACK |
static int |
NOTE_TRACKERR |
static int |
NOTE_WRITE |
Constructor and Description |
---|
BSD() |
Modifier and Type | Method and Description |
---|---|
static int |
kevent(int kq,
BSD.kevent[] changelist,
BSD.kevent[] eventlist,
Unix.timespec timeout) |
static int |
kqueue() |
getIntDefine
public static final short EV_ADD
public static final short EV_ENABLE
public static final short EV_DISABLE
public static final short EV_DELETE
public static final short EV_ONESHOT
public static final short EV_CLEAR
public static final short EV_EOF
public static final short EV_ERROR
public static final short EVFILT_VNODE
public static final short EVFILT_PROC
public static final int NOTE_DELETE
public static final int NOTE_WRITE
public static final int NOTE_EXTEND
public static final int NOTE_ATTRIB
public static final int NOTE_LINK
public static final int NOTE_RENAME
public static final int NOTE_REVOKE
public static final int NOTE_EXIT
public static final int NOTE_FORK
public static final int NOTE_EXEC
public static final int NOTE_TRACK
public static final int NOTE_TRACKERR
public static int kqueue()
public static int kevent(int kq, BSD.kevent[] changelist, BSD.kevent[] eventlist, Unix.timespec timeout)
kq
- the kqueue to read events from/change events in. Obtained with kqueue().changelist
- an array of kevent instances that indicate events to add/remove or modify. If
null, no changes will be applied to the kqueue.eventlist
- an array that the function will fill with events that occurred. If there are
more events available than there is space in this array, the array will be filled. A
subsequent call to kevent() will yield the remaining events. Use select() on the kqueue
file descriptor to check if there are events pending. Non-null array elements will be
kept; their values will be overwritten. The function will assign new
kqueue objects to null array elements. Note that providing an eventlist
array pre-filled with kevent objects will improve performance. If
null is specified, no events will be read, and the function returns
immediately.timeout
- timeout value. If null, the function will wait
indefinitely until events are available (unless an error occurred).
Otherwise, the function will wait for the specified timeout for events
(which may be zero), again, unless an error occurs. Note that the function
will return immediately if eventlist is null or it's length is zero,
regardless of the timeout specified.