From bb0ddc2f1eca652aa8af56825b2ba3182498cc5a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Mar 2003 11:45:12 +0000 Subject: * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_fixup_plt): Don't use weak_extern for dl_rtld_map. Instead check only if [SHARED]. (elf_machine_rela): Clean up. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up. PowerPC TLS support contributed by Paul Mackerras . * sysdeps/powerpc/powerpc32/elf/configure.in: New file. * sysdeps/powerpc/powerpc32/elf/configure: New generated file. * elf/tls-macros.h [__powerpc__ && !__powerpc64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support new relocs for TLS. * sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these macros out of [SHARED]. (TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros. * elf/elf.h: Define R_PPC_* relocs for TLS support. Clean up R_PPC64_* macro definition comments. --- linuxthreads/manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'linuxthreads/manager.c') diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index 8f9b23841b..3ecf7d16f8 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -638,13 +638,13 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, new_thread_id = sseg + pthread_threads_counter; /* Initialize the thread descriptor. Elements which have to be initialized to zero already have this value. */ -#if defined USE_TLS && TLS_DTV_AT_TP - new_thread->p_header.data.tcb = new_thread + 1; -#else +#if !defined USE_TLS || !TLS_DTV_AT_TP new_thread->p_header.data.tcb = new_thread; -#endif new_thread->p_header.data.self = new_thread; - new_thread->p_header.data.multiple_threads = 1; +#endif +#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP + new_thread->p_multiple_threads = 1; +#endif new_thread->p_tid = new_thread_id; new_thread->p_lock = &(__pthread_handles[sseg].h_lock); new_thread->p_cancelstate = PTHREAD_CANCEL_ENABLE; -- cgit v1.2.3