From owner-svn-src-head@FreeBSD.ORG Fri Nov 20 20:43:34 2009 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 C9A351065672; Fri, 20 Nov 2009 20:43:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4E18FC19; Fri, 20 Nov 2009 20:43:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKhY5Z056007; Fri, 20 Nov 2009 20:43:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKhYas056003; Fri, 20 Nov 2009 20:43:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911202043.nAKKhYas056003@svn.freebsd.org> From: John Baldwin Date: Fri, 20 Nov 2009 20:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199614 - in head/lib/libc: gen include 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: Fri, 20 Nov 2009 20:43:34 -0000 Author: jhb Date: Fri Nov 20 20:43:34 2009 New Revision: 199614 URL: http://svn.freebsd.org/changeset/base/199614 Log: Revert the previous change to pthread_once() stub in libc. It is actually a feature that libstdc++ depends on to simulate the behavior of libc's internal '__isthreaded' variable. One benefit of this is that _libc_once() is now private to _once_stub.c. Requested by: kan Modified: head/lib/libc/gen/_once_stub.c head/lib/libc/gen/_pthread_stubs.c head/lib/libc/include/libc_private.h Modified: head/lib/libc/gen/_once_stub.c ============================================================================== --- head/lib/libc/gen/_once_stub.c Fri Nov 20 20:43:16 2009 (r199613) +++ head/lib/libc/gen/_once_stub.c Fri Nov 20 20:43:34 2009 (r199614) @@ -33,11 +33,8 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" -/* - * This implements pthread_once() for the single-threaded case. It is - * non-static so that it can be used by _pthread_stubs.c. - */ -int +/* This implements pthread_once() for the single-threaded case. */ +static int _libc_once(pthread_once_t *once_control, void (*init_routine)(void)) { Modified: head/lib/libc/gen/_pthread_stubs.c ============================================================================== --- head/lib/libc/gen/_pthread_stubs.c Fri Nov 20 20:43:16 2009 (r199613) +++ head/lib/libc/gen/_pthread_stubs.c Fri Nov 20 20:43:34 2009 (r199614) @@ -105,7 +105,7 @@ pthread_func_entry_t __thr_jtable[PJT_MA {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_LOCK */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_TRYLOCK */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_UNLOCK */ - {PJT_DUAL_ENTRY(_libc_once)}, /* PJT_ONCE */ + {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_ONCE */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_RWLOCK_DESTROY */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_RWLOCK_INIT */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_RWLOCK_RDLOCK */ Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Fri Nov 20 20:43:16 2009 (r199613) +++ head/lib/libc/include/libc_private.h Fri Nov 20 20:43:34 2009 (r199614) @@ -152,7 +152,6 @@ void _init_tls(void); * and multi-threaded applications. */ int _once(pthread_once_t *, void (*)(void)); -int _libc_once(pthread_once_t *, void (*)(void)); /* * Set the TLS thread pointer