Make ppoll(2) and waitid(2) cancellation points

Jilles Tjoelker jilles at stack.nl
Fri Apr 17 22:29:32 UTC 2015


On Fri, Apr 17, 2015 at 10:59:33AM +0300, Konstantin Belousov wrote:
> Patch below makes ppoll(2) and waitid(2) cancellable.

> The waitid(2) is required to be a cancellation point by POSIX, so the
> change fixes a definite bug. It is done by making wait6() cancellable,
> in line with the other wait*(2) syscalls.

> For ppoll(2), our other select/poll interfaces are cancel points, i.e.
> select, pselect, and poll. It is reasonable for ppoll() to follow the
> suite.

> The interposing table was extended at the end, instead of ordering new
> interposers by alphabet.  It would be acceptable, but makes it easier
> for people to run new libc with older libthr (although not supported).

lib/libc/gen/waitid.c needs to be adjusted to call
__libc_interposing[INTERPOS_wait6] instead of _wait6 which is not a
cancellation point.

Please add comments about cancellation behaviour to
lib/libthr/thread/thr_syscalls.c. You can just copy the comments from
__thr_poll and __thr_wait4.

Looks good otherwise.

-- 
Jilles Tjoelker


More information about the freebsd-arch mailing list