kevent behavior

Konstantin Belousov kostikbel at gmail.com
Wed Mar 25 09:00:51 UTC 2015


On Tue, Mar 24, 2015 at 11:15:41PM +0100, Jilles Tjoelker wrote:
> Fortunately, EVFILT_USER provides an easy way to wake up a thread
> blocked in kevent().
> 
> If kevent() was implemented as a cancellation point, pthread_cancel()
> would be another option, but it is not.

Do you consider it is possible to make kqueue(2) cancellation point ?
Susv4 is very explicit about functions it allows to handle cancellation.
Might be, it is time for kqueue2(3), which would take flags.
In addition to allowing cancellation, it could take close-on-exec flag.

It is somewhat non-trivial to implement, at least I do not want to make
kevent2().


More information about the freebsd-hackers mailing list