Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 11:00:41 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        freebsd-hackers@FreeBSD.org, Ivan Radovanovic <radovanovic@gmail.com>
Subject:   Re: kevent behavior
Message-ID:  <20150325090041.GY2379@kib.kiev.ua>
In-Reply-To: <20150324221541.GA67584@stack.nl>
References:  <550A6DA2.1070004@gmail.com> <20150324221541.GA67584@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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().



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150325090041.GY2379>