Date: Sat, 18 Apr 2015 00:29:27 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Konstantin Belousov <kostikbel@gmail.com> Cc: arch@freebsd.org Subject: Re: Make ppoll(2) and waitid(2) cancellation points Message-ID: <20150417222927.GB34016@stack.nl> In-Reply-To: <20150417075933.GH2390@kib.kiev.ua> References: <20150417075933.GH2390@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150417222927.GB34016>