From owner-svn-src-head@FreeBSD.ORG Mon Nov 28 16:45:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76E54106566B; Mon, 28 Nov 2011 16:45:49 +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 47C338FC16; Mon, 28 Nov 2011 16:45:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id DDD3746B37; Mon, 28 Nov 2011 11:45:48 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6E71CB942; Mon, 28 Nov 2011 11:45:48 -0500 (EST) From: John Baldwin To: David Chisnall Date: Mon, 28 Nov 2011 11:00:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111261557.pAQFv9s1097893@svn.freebsd.org> In-Reply-To: <201111261557.pAQFv9s1097893@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111281100.30432.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 28 Nov 2011 11:45:48 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227999 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 16:45:49 -0000 On Saturday, November 26, 2011 10:57:09 am David Chisnall wrote: > Author: theraven > Date: Sat Nov 26 15:57:09 2011 > New Revision: 227999 > URL: http://svn.freebsd.org/changeset/base/227999 > > Log: > Return not-implemented from pthread_once and pthread_key_create, rather > than silently failing and returning success. > > Without this, code calls pthread_once(), receives a return value of > success, and thinks that the passed function has been called. > > Approved by: dim (mentor) Hmmm, is this really the best fix? I really want pthread_once() to always work (see the hack I have to do with _once() in libc to workaround the fact that it doesn't now). The current behavior exists to appease libstdc++ which uses a silently failing pthread_once() to figure out if it is linked against working threads. If this is for libc++, can you provide some other way than abusing pthread_once() to determine this? Ideally it would be as smart as libc and use __isthreaded in some fastion. -- John Baldwin