kevent: Don't poll for nonzero timeouts < 1us.
authorcheloha <cheloha@openbsd.org>
Tue, 4 Sep 2018 02:38:25 +0000 (02:38 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 4 Sep 2018 02:38:25 +0000 (02:38 +0000)
commita36f8271cbe1fe2c9def06c66e3a077f13a6f19c
tree155e1f2b4e295f9df1bcb715211bb7a283ff0497
parent493677ebd8dbcf707731afe5fae193599f51f3e9
kevent: Don't poll for nonzero timeouts < 1us.

Instead of truncating nanosecond timeouts to zero here and polling, we
should round up to a delay of at least a tick, just like all the other
timespec syscalls.

Fixed in NetBSD kern_event.c v1.62 and FreeBSD r247804.

ok millert@ visa@
sys/kern/kern_event.c