kqueue1(2): document

Reviewed by:	emaste, jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D39271
This commit is contained in:
Konstantin Belousov 2023-03-26 01:41:21 +02:00
parent 375732cc6e
commit f2ec444be5
2 changed files with 20 additions and 1 deletions

View File

@ -430,6 +430,7 @@ MLINKS+=jail.2 jail_attach.2 \
jail.2 jail_set.2
MLINKS+=kldunload.2 kldunloadf.2
MLINKS+=kqueue.2 kevent.2 \
kqueue.2 kqueue1.2 \
kqueue.2 EV_SET.3
MLINKS+=link.2 linkat.2
MLINKS+=madvise.2 posix_madvise.2

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 14, 2022
.Dd March 26, 2023
.Dt KQUEUE 2
.Os
.Sh NAME
@ -38,6 +38,8 @@
.Ft int
.Fn kqueue "void"
.Ft int
.Fn kqueue1 "u_int flags"
.Ft int
.Fo kevent
.Fa "int kq"
.Fa "const struct kevent *changelist"
@ -90,6 +92,22 @@ flag, then the descriptor table is shared,
which will allow sharing of the kqueue between two processes.
.Pp
The
.Fn kqueue1
system call also creates a new kernel event queue, and additionally takes
the
.Fa flags
argument, which is a bitwise-inclusive OR of the following flags:
.Bl -tag -width "KQUEUE_CLOEXEC"
.It Fa KQUEUE_CLOEXEC
The returned file descriptor is automatically closed on
.Xr execve 2
.El
The
.Ql fd = kqueue()
call is equivalent to
.Ql fd = kqueue1(0) .
.Pp
The
.Fn kevent
system call
is used to register events with the queue, and return any pending