Date: Fri, 20 Nov 2009 20:43:34 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r199614 - in head/lib/libc: gen include Message-ID: <200911202043.nAKKhYas056003@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911202043.nAKKhYas056003>