mirror of git://sourceware.org/git/glibc.git
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.
This commit is contained in:
parent
7498f1b0ba
commit
5517266d33
|
@ -27,6 +27,7 @@
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/wait.h> /* for waitpid macros */
|
#include <sys/wait.h> /* for waitpid macros */
|
||||||
|
#include <locale.h> /* for __uselocale */
|
||||||
|
|
||||||
#include <ldsodefs.h>
|
#include <ldsodefs.h>
|
||||||
#include "pthread.h"
|
#include "pthread.h"
|
||||||
|
@ -301,6 +302,11 @@ pthread_start_thread(void *arg)
|
||||||
__sched_setscheduler(THREAD_GETMEM(self, p_pid),
|
__sched_setscheduler(THREAD_GETMEM(self, p_pid),
|
||||||
SCHED_OTHER, &default_params);
|
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 */
|
/* Make gdb aware of new thread */
|
||||||
if (__pthread_threads_debug && __pthread_sig_debug > 0) {
|
if (__pthread_threads_debug && __pthread_sig_debug > 0) {
|
||||||
request.req_thread = self;
|
request.req_thread = self;
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "restart.h"
|
#include "restart.h"
|
||||||
#include <ldsodefs.h>
|
#include <ldsodefs.h>
|
||||||
#include <tls.h>
|
#include <tls.h>
|
||||||
|
#include <locale.h> /* for __uselocale */
|
||||||
|
|
||||||
/* Sanity check. */
|
/* Sanity check. */
|
||||||
#if __ASSUME_REALTIME_SIGNALS && !defined __SIGRTMIN
|
#if __ASSUME_REALTIME_SIGNALS && !defined __SIGRTMIN
|
||||||
|
@ -460,6 +461,12 @@ __pthread_initialize_minimal(void)
|
||||||
__pthread_initial_thread.p_cpuclock_offset = GL(dl_cpuclock_offset);
|
__pthread_initial_thread.p_cpuclock_offset = GL(dl_cpuclock_offset);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue