diff options
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r-- | nptl/pthread_create.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index e7a099acb7..a06d611e32 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -624,9 +624,12 @@ __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr, /* Avoid a data race in the multi-threaded case, and call the deferred initialization only once. */ - if (__libc_single_threaded) + if (__libc_single_threaded_internal) { late_init (); + __libc_single_threaded_internal = 0; + /* __libc_single_threaded can be accessed through copy relocations, so + it requires to update the external copy. */ __libc_single_threaded = 0; } |