From owner-freebsd-arch@FreeBSD.ORG Fri Apr 17 13:30:52 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DC839A0 for ; Fri, 17 Apr 2015 13:30:52 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AC4610E for ; Fri, 17 Apr 2015 13:30:52 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 604C6B94B; Fri, 17 Apr 2015 09:30:51 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Cc: Konstantin Belousov Subject: Re: Make ppoll(2) and waitid(2) cancellation points Date: Fri, 17 Apr 2015 09:26:23 -0400 Message-ID: <1618723.JaybXFdLjb@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150417075933.GH2390@kib.kiev.ua> References: <20150417075933.GH2390@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 17 Apr 2015 09:30:51 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2015 13:30:52 -0000 On Friday, April 17, 2015 10:59:33 AM 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). Sounds good to me. > diff --git a/lib/libc/sys/wait6.c b/lib/libc/sys/wait6.c > new file mode 100644 > index 0000000..f0e2999 > --- /dev/null > +++ b/lib/libc/sys/wait6.c > @@ -0,0 +1,52 @@ > +/* > + * Copyright (c) 2014 The FreeBSD Foundation. > + * All rights reserved. s/2014/2015/? -- John Baldwin