diff options
author | Roland McGrath <roland@gnu.org> | 2002-08-04 03:25:12 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-08-04 03:25:12 +0000 |
commit | 5517266d33193ca13de097fa2775661c3bc6dac0 (patch) | |
tree | 77c86578cbec341eac97e3c1ffb2c8f34f5c7942 /linuxthreads/manager.c | |
parent | 7498f1b0ba2c464d11db4ac04afc7d5612a8edd6 (diff) | |
download | glibc-5517266d33193ca13de097fa2775661c3bc6dac0.zip glibc-5517266d33193ca13de097fa2775661c3bc6dac0.tar.gz glibc-5517266d33193ca13de097fa2775661c3bc6dac0.tar.bz2 |
2002-08-02 Roland McGrath <roland@redhat.com>
* sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
Add _LIBC_TSD_KEY_LOCALE.
* manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
Call __uselocale to initialize our per-thread locale pointer to
the global one.
* pthread.c (__pthread_initialize_minimal): Likewise.
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r-- | linuxthreads/manager.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index 11588fb..8ad9eb5 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -27,6 +27,7 @@ #include <sys/param.h> #include <sys/time.h> #include <sys/wait.h> /* for waitpid macros */ +#include <locale.h> /* for __uselocale */ #include <ldsodefs.h> #include "pthread.h" @@ -301,6 +302,11 @@ pthread_start_thread(void *arg) __sched_setscheduler(THREAD_GETMEM(self, p_pid), SCHED_OTHER, &default_params); } +#if !(USE_TLS && HAVE___THREAD) && defined SHARED + /* Initialize thread-locale current locale to point to the global one. + With __thread support, the variable's initializer takes care of this. */ + __uselocale (LC_GLOBAL_LOCALE); +#endif /* Make gdb aware of new thread */ if (__pthread_threads_debug && __pthread_sig_debug > 0) { request.req_thread = self; |