From owner-freebsd-threads@FreeBSD.ORG Fri Oct 9 16:08:14 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F9251065693 for ; Fri, 9 Oct 2009 16:08:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 527248FC36 for ; Fri, 9 Oct 2009 16:08:14 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 052B246B0C; Fri, 9 Oct 2009 12:08:14 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3A1CA8A026; Fri, 9 Oct 2009 12:08:13 -0400 (EDT) From: John Baldwin To: freebsd-threads@freebsd.org Date: Fri, 9 Oct 2009 10:38:34 -0400 User-Agent: KMail/1.9.7 References: <20091005171729.GA2830@stack.nl> In-Reply-To: <20091005171729.GA2830@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910091038.34735.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 09 Oct 2009 12:08:13 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Jilles Tjoelker Subject: Re: review request: making openat(2) a cancellation point X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 16:08:14 -0000 On Monday 05 October 2009 1:17:29 pm Jilles Tjoelker wrote: > While implementing a faster, cleaner and more compliant getcwd(3) using > *at functions, I noticed that openat() was not a cancellation point > (unlike open()). I think that should be fixed first, both for its own > sake and because getcwd() will need to use _openat. >=20 > I created the attached patch. It seems to work, I can still compile and > run non-threaded and threaded programs using openat() and I can cancel a > thread blocked in openat() (such as trying to open a fifo). I can also > use _openat in libc. However, I think some review is appropriate because > it all looks fairly complicated. >=20 > Because libkse and libc_r don't seem to be built, I have not updated > them. >=20 > Note that this will cause threaded 9.x binaries that use openat() to > break on 8.x. This is to be expected. =46rom what I can tell the patch looks fine to me. =2D-=20 John Baldwin