kevent behavior

Jilles Tjoelker jilles at stack.nl
Sun Mar 29 17:22:09 UTC 2015


On Sun, Mar 29, 2015 at 07:03:38PM +0300, Konstantin Belousov wrote:
> On Sun, Mar 29, 2015 at 05:03:16PM +0200, Jilles Tjoelker wrote:
> > On Fri, Mar 27, 2015 at 03:26:54PM +0200, Konstantin Belousov wrote:
> > > +Otherwise, i.e. if
> > > +.Fa nevents
> > > +is zero, the call is not cancellable.
> > 
> > > +Cancellation can only occur when the call was blocked and no changes
> > > +to the queue were requested.
> > 
> > This is not how the code works, but I think the code is correct. The
> > code also allows cancellation before anything happens. As such, if
> > cancellation occurs at kevent(2), the kqueue's state is unchanged (from
> > that call).
> Below is only a new diff for the man pages changes.  I found our list
> of the cancellation points in the pthread_testcancel(3), but did not
> checked it for correctness.

Given that the special case for fcntl() is mentioned in
pthread_testcancel(3) (only a cancellation point if cmd is F_SETLKW),
the same should be done for kevent().

Looks good to me otherwise.

-- 
Jilles Tjoelker


More information about the freebsd-hackers mailing list