HomeFreeBSD

Make it possible to implement poll(2) on top of kqueue(2).

Description

Make it possible to implement poll(2) on top of kqueue(2).

It looks like EVFILT_READ and EVFILT_WRITE trigger under the same
conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX.
The only difference is that POLLRDNORM has to be triggered on regular
files unconditionally, whereas EVFILT_READ only triggers when not EOF.

Introduce a new flag, NOTE_FILE_POLL, that can be used to make
EVFILT_READ and EVFILT_WRITE behave identically to poll(). This flag
will be used by cloudlibc's poll() function.

Reviewed by: jmg
Differential Revision: https://reviews.freebsd.org/D3303

Details

Provenance
edAuthored on
Reviewer
jmg
Differential Revision
D3303: Make it possible to implement poll(2) on top of kqueue(2).
Parents
rS286306: MFC r285046:
Branches
Unknown
Tags
Unknown