From 299601a1ef8df4532ded24194c4556e294ab1e6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Apr 2003 09:12:43 +0000 Subject: Update. 2003-04-22 Jakub Jelinek * include/link.h (NO_TLS_OFFSET): Define to 0 if not defined. * elf/dl-close.c (_dl_close): Use NO_TLS_OFFSET. * elf/dl-object.c (_dl_new_object): Initialize l_tls_offset to NO_TLS_OFFSET. * elf/rtld.c (_dl_start_final, _dl_start): Likewise. * elf/dl-reloc.c (CHECK_STATIC_TLS): Use NO_TLS_OFFSET. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Likewise. * sysdeps/powerpc/dl-tls.h (TLS_TPREL_VALUE): Don't subtract TLS_TCB_SIZE. --- linuxthreads/pthread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linuxthreads/pthread.c') diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index 8b1b14fff9..38a9f7df6e 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -571,7 +571,7 @@ int __pthread_initialize_manager(void) __pthread_multiple_threads = 1; #if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP - __pthread_main_thread->p_multiple_threads = 1; + p_multiple_threads (__pthread_main_thread) = 1; #endif *__libc_multiple_threads_ptr = 1; @@ -612,7 +612,7 @@ int __pthread_initialize_manager(void) # elif TLS_DTV_AT_TP /* pthread_descr is located right below tcbhead_t which _dl_allocate_tls returns. */ - mgr = (pthread_descr) tcbp - 1; + mgr = (pthread_descr) ((char *) tcbp - TLS_PRE_TCB_SIZE); # endif __pthread_handles[1].h_descr = manager_thread = mgr; @@ -620,9 +620,9 @@ int __pthread_initialize_manager(void) #if !defined USE_TLS || !TLS_DTV_AT_TP mgr->p_header.data.tcb = tcbp; mgr->p_header.data.self = mgr; - mgr->p_header.data.multiple_threads = 1; + p_multiple_threads (mgr) = 1; #elif TLS_MULTIPLE_THREADS_IN_TCB - mgr->p_multiple_threads = 1; + p_multiple_threads (mgr) = 1; #endif mgr->p_lock = &__pthread_handles[1].h_lock; # ifndef HAVE___THREAD -- cgit v1.2.3