CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2022/02/08 01:56:41

Modified files:
        sys/kern       : kern_event.c sys_generic.c 
        sys/sys        : event.h eventvar.h 

Log message:
poll(2): Switch to kqueue backend

Implement the poll(2) system call on top of the kqueue subsystem.
This obsoletes the old, non-MP-safe poll backend.

On entering poll(2), the new code translates each pollfd array entry
into a set of knotes. When these knotes receive events through kqueue,
the events are translated back to pollfd format.

Entries in the pollfd array can refer to the same file descriptor with
overlapping event masks. To allow such overlap with knotes, use an extra
kn_pollid key that separates knotes of different pollfd entries.

Adapted from DragonFly BSD, initial implementation by mpi@.

Tested in snaps for three weeks.

OK mpi@

Reply via email to