summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>2000-09-22 03:59:37 +0000
committerJohn Polstra <jdp@FreeBSD.org>2000-09-22 03:59:37 +0000
commit33dfb5fcf55e8093fa602a2753a649f41f502ac4 (patch)
treedae52c96116c2158bff616bc3d091ac2aea9a64a /lib
parent1a50b5017daeabf785ee59608421cafe122b9d5c (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/uthread/uthread_once.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_once.c b/lib/libc_r/uthread/uthread_once.c
index ea56d82c4d83..d7bb494b6741 100644
--- a/lib/libc_r/uthread/uthread_once.c
+++ b/lib/libc_r/uthread/uthread_once.c
@@ -39,6 +39,8 @@ int
pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
{
if (once_control->state == PTHREAD_NEEDS_INIT) {
+ if (_thread_initial == NULL)
+ _thread_init();
pthread_mutex_lock(&(once_control->mutex));
if (once_control->state == PTHREAD_NEEDS_INIT) {
init_routine();