Home | History | Annotate | Download | only in sys
History log of /src/lib/libc/sys/kqueue.2
RevisionDateAuthorComments
 1.60  28-Jul-2023  wiz Fix some macro( usage)s
 1.59  28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.58  13-Feb-2022  pgoyette Fix typo
 1.57  23-Oct-2021  thorpej Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty. This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver. Compatible
with the same filter in FreeBSD.
 1.56  20-Oct-2021  thorpej Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.
 1.55  20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.54  13-Oct-2021  thorpej Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
 1.53  31-Oct-2020  christos add missing sentence.
 1.52  31-Oct-2020  wiz Remove trailing whitespace.
 1.51  31-Oct-2020  christos PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2)
 1.50  23-Dec-2019  kamil Explain in kevent(2) the semantics of EINTR

All changes contained in the changelist are applied before returning this
error.
 1.49  22-Dec-2019  kamil Document udata type switch in struct kevent in the kqueue(2)
 1.48  12-Apr-2019  abhinav Markup improvements: use Dv for kqueue filters, events and note names

ok wiz@
 1.47  09-Jan-2018  christos branches: 1.47.4;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
 1.46  03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.45  07-Jun-2017  kamil EV_SET(2) - simplify description

Note only the information that it does not evaluate multiple times its
parameters.

Suggested by <wiz>.
 1.44  07-Jun-2017  abhinav s/filesystem/file system/

Thanks to Thomas for pointing out that in NetBSD man pages we try to use the convention of writing it
as "file system".
 1.43  06-Jun-2017  abhinav Bump date for previous
Fix typo: fileystem -> filesystem
 1.42  06-Jun-2017  kamil Update the EV_SET() description with newer implementation.

EV_SET(2) is a macro again, that wraps an inline function which is still
new in NetBSD 8.0.

Sponsored by <The NetBSD Foundation>
 1.41  31-May-2017  kamil Document transition of EV_SET() from a macro to a static inline function

Sponsored by <The NetBSD Foundation>
 1.40  11-Apr-2017  abhinav Use more markup for `struct timespec`
Use Xr to refer to timespec(3)
Add timespec(3) to SEE ALSO
 1.39  11-Apr-2017  abhinav s/Sets/Set: Use style consistent with the other sentences in that list.
Add .Pp before next sentence.
 1.38  02-Apr-2017  abhinav Fix sentence.
 1.37  01-Apr-2017  abhinav Add EV_SET() to the NAME section
Use Xr instead of Fn to refer other man pages
Add some more entries to SEE ALSO

Reviewed by wiz@
 1.36  19-Dec-2016  abhinav branches: 1.36.2;
Use markup for errno
Also remove a .Pp before .Bl while there
 1.35  08-Dec-2015  christos branches: 1.35.2;
PR/50506: Tobias Nygren: kqueue(2) lacks EV_DISPATCH/EV_RECEIPT support
 1.34  02-Mar-2015  christos say that we put the exit code in data.
 1.33  24-Nov-2012  christos branches: 1.33.8;
mention that kevent returns now EOPNOTSUPP.
 1.32  25-Jan-2012  christos branches: 1.32.2; 1.32.6; 1.32.8;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.31  26-Jun-2011  christos branches: 1.31.2;
* Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.30  24-May-2011  ryo fix incorrect variable name
 1.29  13-Apr-2010  wiz Uncomment pdf link for paper.
 1.28  13-Apr-2010  jruoho Add the USENIX paper of Jonathan Lemon to SEE ALSO.
 1.27  22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.26  22-Nov-2009  mbalmer remove one the to much.
 1.25  24-Oct-2009  christos simplify the example; only register the set of events to watch once since
it does not change. Also print that ATTR means changing times too.
 1.24  01-Sep-2009  wiz Make HTML-ready.
 1.23  01-Sep-2009  elad Add useful example program from

http://mail-index.netbsd.org/tech-kern/2009/09/01/msg006020.html
 1.22  12-Mar-2009  wiz Use comments instead of .ig (requested by joerg).
Sort errors while here.
 1.21  25-Feb-2009  ad Remove pointless AUTHORS sections. The names are in the source and CVS
history along with everyone else who has contributed.
 1.20  13-Oct-2006  wiz branches: 1.20.28;
Make HTML-output safe.
 1.19  09-Dec-2003  augustss Reference kfilter_register(9) rather than the non-existent kfilter_register(2).
 1.18  16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17  16-Feb-2003  tron After "sys/event.h" was fixed "sys/types.h" doesn't need to be included
manually any more.
 1.16  04-Feb-2003  jdolecek update copyright dates and .Dd
 1.15  04-Feb-2003  jdolecek Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD
 1.14  19-Jan-2003  jdolecek g/c the NEXTRELEASE comment tag now that the next version number is decided
 1.13  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12  04-Nov-2002  jdolecek struct kevent's udata is actually intptr_t
 1.11  23-Oct-2002  jdolecek update HISTORY - kqueue branch was merged
bump date
 1.10  23-Oct-2002  jdolecek 'data' field of struct kevent is actually int64_t nowadays
 1.9  13-Oct-2002  jdolecek branches: 1.9.2;
no more BUGS; EVFILT_{VNODE,READ} is supported also for other filesystems
than FFS
 1.8  01-Oct-2002  wiz deprecated, not depreciated.
 1.7  01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.6  25-Sep-2002  wiz Drop trailing whitespace, and some mdoc fixes and improvements.
 1.5  24-Sep-2002  jdolecek add missing comma
 1.4  24-Sep-2002  jdolecek 'data' contains amount of space remaining in the write buffer also
for ttys
 1.3  22-Sep-2002  jdolecek add kqueue(2)/kevent(2) manpage to mainline, to reduce difference between
the kqueue branch and -current and thus make testing easier

change HISTORY to clearly state this interface is only available with
experimental kernel branch
add Jason Thorpe and me to AUTHORS
update .Dd
 1.2  10-Jul-2001  lukem move to kqueue branch for now
 1.1  28-Jun-2001  lukem branches: 1.1.1;
Initial revision
 1.1.1.1  28-Jun-2001  lukem branches: 1.1.1.1.2;
freebsd kqueue implementation
 1.1.1.1.2.3  07-Jun-2002  jdolecek kevent(2): nchanges and nevents changed to size_t
 1.1.1.1.2.2  18-Mar-2002  jdolecek credit Luke in HISTORY section
 1.1.1.1.2.1  10-Jul-2001  lukem document differences in netbsd implementation:
* we don't have rfork or AIO, so don't talk about it
* filter, flags and fflags are now uint32_t
* document KFILTER_BYFILTER and KFILTER_BYNAME ioctls
* expand filter description
 1.9.2.3  11-Nov-2002  nathanw Catch up to -current
 1.9.2.2  18-Oct-2002  nathanw Catch up to -current.
 1.9.2.1  13-Oct-2002  nathanw file kqueue.2 was added on branch nathanw_sa on 2002-10-18 02:16:58 +0000
 1.20.28.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.31.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.31.2.1  17-Apr-2012  yamt sync with head
 1.32.8.1  24-Nov-2012  jdc Pull up revisions:
src/sys/kern/kern_event.c revision 1.79
src/sys/kern/kern_descrip.c revision 1.219
src/lib/libc/sys/kqueue.2 revision 1.33
src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.
 1.32.6.1  25-Feb-2013  tls resync with head
 1.32.2.1  24-Nov-2012  jdc Pull up revisions:
src/sys/kern/kern_event.c revision 1.79
src/sys/kern/kern_descrip.c revision 1.219
src/lib/libc/sys/kqueue.2 revision 1.33
src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.
 1.33.8.1  14-Apr-2015  snj Pull up following revision(s) (requested by christos in ticket #677):
lib/libc/sys/kqueue.2: revision 1.34
sys/kern/kern_event.c: revision 1.83
put the exit code of the process in data, like FreeBSD does.
--
say that we put the exit code in data.
 1.35.2.2  26-Apr-2017  pgoyette Sync with HEAD
 1.35.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.36.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.47.4.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.4.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed