KNOTE(9)
πΈ NAME πΈ
okay bestie, welcome to the KNOTE(9) page from the Kernel Developerβs Manual, section 9 β itβs giving kernel-event realness β¨
knote,KNOTEβ raise kernel event π
π¦ SYNOPSIS π¦
#include <sys/event.h>
void
knote(struct klist *list, long hint);
KNOTE(struct klist *list, long hint);
β¨ DESCRIPTION β¨
so the knote() function is literally the hook into the kqueue kernel event notification mechanism β it lets sections of the kernel 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, plus a hint (which is passed to the appropriate filter routine). then knote() 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 thansplsched(9). no cap, thatβs the rule π
KNOTE() is a macro that calls knote(list, hint) if list is not empty β¨
π SEE ALSO π
π HISTORY π
the knote() and KNOTE() functions first appeared in FreeBSD 4.1, and then in NetBSD 2.0 π
π AUTHORS π
the kqueue(2) system was written by Jonathan Lemon <jlemon@FreeBSD.org> π
and thatβs the whole page, bestie β the footer says Debian, dated February 18, 2004, and itβs the KNOTE(9) page πβ¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2001, 2002, 2003 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms