On socket EOF, POLLHUP is not returned by poll, so the EOF state has to be
tracked in the fd node context based on the EV_EOF flags.
EV_FORCEONESHOT is not defined, so there is no POLLHUP returned on not yet
connected stream sockets (should not be a big deal).
No EVFILT_USER, so eventfd's are implemented with self pipes.
No NOTE_USECONDS, so timers are only in millisecond resolution.
Curiously, timers on NetBSD can fire before the specified duration is
expired according to CLOCK_MONOTONIC (this is a bug I guess). So polling a
timerfd can result in spurious wakeups. I had to adapt the tests a bit to
guard against this behavior.
Port to NetBSD. Some notes:
errno_t
is not defined.EV_FORCEONESHOT
is not defined, so there is no POLLHUP returned on not yet connected stream sockets (should not be a big deal).EVFILT_USER
, so eventfd's are implemented with self pipes.NOTE_USECONDS
, so timers are only in millisecond resolution.CLOCK_MONOTONIC
(this is a bug I guess). So polling a timerfd can result in spurious wakeups. I had to adapt the tests a bit to guard against this behavior.