From owner-freebsd-threads@FreeBSD.ORG Mon May 16 14:00:25 2011 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1D08106567E for ; Mon, 16 May 2011 14:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A12888FC0A for ; Mon, 16 May 2011 14:00:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4GE0Pga032398 for ; Mon, 16 May 2011 14:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4GE0Ppw032397; Mon, 16 May 2011 14:00:25 GMT (envelope-from gnats) Date: Mon, 16 May 2011 14:00:25 GMT Message-Id: <201105161400.p4GE0Ppw032397@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: John Baldwin Cc: Subject: Re: threads/150959: [libc] Stub pthread_once in libc should call _libc_once X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2011 14:00:25 -0000 The following reply was made to PR threads/150959; it has been noted by GNATS. From: John Baldwin To: bug-followup@FreeBSD.org, temporal@gmail.com Cc: Subject: Re: threads/150959: [libc] Stub pthread_once in libc should call _libc_once Date: Mon, 16 May 2011 09:57:38 -0400 FWIW, I would also prefer that we fix libstdc++ to not depend on this misfeature and properly implement pthread_once() using _libc_once() in the non-threaded case as well. One advantage of fixing libstdc++ to honor __isthreaded would be that single threaded C++ apps that linked against libthr (due to using 3rd party libraries that can use threads but the specific app doesn't enable that, e.g. protobuf) would not always use locks unnecessarily in all of libstdc++. -- John Baldwin