summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsson <sson@FreeBSD.org>2009-09-16 03:30:12 +0000
committersson <sson@FreeBSD.org>2009-09-16 03:30:12 +0000
commit7cb0718a03501c7ac46ff447e23b5aa2a3bd3928 (patch)
tree5cf08a4d51efab9fe7faf458cadd04f32b9753d0 /lib
parent297d4ab14bc244018819c2a5d501fd2cd15923d1 (diff)
downloadFreeBSD-src-7cb0718a03501c7ac46ff447e23b5aa2a3bd3928.zip
FreeBSD-src-7cb0718a03501c7ac46ff447e23b5aa2a3bd3928.tar.gz
Add EVFILT_USER to kevents.
Add user events support to kernel events which are not associated with any kernel mechanism but are triggered by user level code. This is useful for adding user level events to an event handler that may also be monitoring kernel events. Approved by: rwatson (co-mentor)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/kqueue.240
1 files changed, 39 insertions, 1 deletions
diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2
index 119ff79..1e5e2b5 100644
--- a/lib/libc/sys/kqueue.2
+++ b/lib/libc/sys/kqueue.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 6, 2007
+.Dd September 15, 2009
.Dt KQUEUE 2
.Os
.Sh NAME
@@ -441,6 +441,44 @@ The link state is invalid.
On return,
.Va fflags
contains the events which triggered the filter.
+.It Dv EVFILT_USER
+Establishes a user event identified by
+.Va ident
+which is not assosicated with any kernel mechanism but is triggered by
+user level code.
+The lower 24 bits of the
+.Va fflags
+may be used for user defined flags and manipulated using the following:
+.Bl -tag -width XXNOTE_FFLAGSMASK
+.It Dv NOTE_FFNOP
+Ignore the input
+.Va fflags .
+.It Dv NOTE_FFAND
+Bitwise AND
+.Va fflags .
+.It Dv NOTE_FFOR
+Bitwise OR
+.Va fflags .
+.It Dv NOTE_COPY
+Copy
+.Va fflags .
+.It Dv NOTE_FFCTRLMASK
+Control mask for
+.Va fflags .
+.It Dv NOTE_FFLAGSMASK
+User defined flag mask for
+.Va fflags .
+.El
+.Pp
+A user event is triggered for output with the following:
+.Bl -tag -width XXNOTE_FFLAGSMASK
+.It Dv NOTE_TRIGGER
+Cause the event to be triggered.
+.El
+.Pp
+On return,
+.Va fflags
+contains the users defined flags in the lower 24 bits.
.El
.Sh RETURN VALUES
The
OpenPOWER on IntegriCloud