Home Man
Today's Posts

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

NetBSD 6.1.5 - man page for knote (netbsd section 9)

KNOTE(9)			  BSD Kernel Developer's Manual 			 KNOTE(9)

     knote, KNOTE -- raise kernel event

     #include <sys/event.h>

     knote(struct klist *list, long hint);

     KNOTE(struct klist *list, long hint);

     The knote() function provides a hook into the kqueue kernel event notification mechanism to
     allow sections of the kernel to raise a kernel event in the form of a 'knote', which is a
     struct knote as defined in <sys/event.h>.

     knote() takes a singly linked list of knotes, along with a hint (which is passed to the
     appropriate filter routine).  knote() then walks the list making calls to the filter routine
     for each knote.  As each knote contains a reference to the data structure that it is
     attached to, the filter may choose to examine the data structure in deciding whether an
     event should be reported.	The hint is used to pass in additional information, which may not
     be present in the data structure that the filter examines.

     If the filter decides that the event should be returned, it returns a non-zero value and
     knote() links the knote onto the tail end of the active list in the corresponding kqueue for
     the application to retrieve.  If the knote is already on the active list, no action is
     taken, but the call to the filter occurs in order to provide an opportunity for the filter
     to record the activity.

     knote() must not be called from interrupt contexts running at an interrupt priority level
     higher than splsched().

     KNOTE() is a macro that calls knote(list, hint) if list is not empty.

     kqueue(2), kfilter_register(9)

     The knote() and KNOTE() functions first appeared in FreeBSD 4.1, and then in NetBSD 2.0.

     The kqueue() system was written by Jonathan Lemon <jlemon@FreeBSD.org>.

BSD					February 18, 2004				      BSD

All times are GMT -4. The time now is 11:07 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password