diff options
author | jhb <jhb@FreeBSD.org> | 2009-11-20 20:43:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-11-20 20:43:34 +0000 |
commit | e66ae1c3f9bd142ce98d9a41f908d7e62fca76af (patch) | |
tree | 3fedaf844c829871fe1603222e4889335460a3a6 /lib | |
parent | 9b1c572dee33b0cb3cc9bfbcdf44e7e0c5a81ec8 (diff) | |
download | FreeBSD-src-e66ae1c3f9bd142ce98d9a41f908d7e62fca76af.zip FreeBSD-src-e66ae1c3f9bd142ce98d9a41f908d7e62fca76af.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/_once_stub.c | 7 | ||||
-rw-r--r-- | lib/libc/gen/_pthread_stubs.c | 2 | ||||
-rw-r--r-- | lib/libc/include/libc_private.h | 1 |
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/libc/gen/_once_stub.c b/lib/libc/gen/_once_stub.c index 0d20c01..d2acc29 100644 --- a/lib/libc/gen/_once_stub.c +++ b/lib/libc/gen/_once_stub.c @@ -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)) { diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index 3b80e1d..147235e 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -105,7 +105,7 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { {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 */ diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index bcf2b1c..052eb13 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -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 |