From 5517266d33193ca13de097fa2775661c3bc6dac0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Aug 2002 03:25:12 +0000 Subject: 2002-08-02 Roland McGrath * 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. --- linuxthreads/manager.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linuxthreads/manager.c') diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index 11588fbb21..8ad9eb521b 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -27,6 +27,7 @@ #include #include #include /* for waitpid macros */ +#include /* for __uselocale */ #include #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; -- cgit 1.4.1