summaryrefslogtreecommitdiff
path: root/linuxthreads/manager.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-25 09:12:43 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-25 09:12:43 +0000
commit299601a1ef8df4532ded24194c4556e294ab1e6e (patch)
tree7e7338ca0004ce7fdba3e7429677ef0a5786ad8f /linuxthreads/manager.c
parent29bfc9453e2945b476cec5545f8409fd2a2ba886 (diff)
Update.
2003-04-22 Jakub Jelinek <jakub@redhat.com> * 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.
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r--linuxthreads/manager.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 3ecf7d16f8..b4893c19f2 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -591,8 +591,8 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
if (new_thread == NULL)
return EAGAIN;
# if TLS_DTV_AT_TP
- /* pthread_descr is right below TP. */
- --new_thread;
+ /* pthread_descr is below TP. */
+ new_thread = (pthread_descr) ((char *) new_thread - TLS_PRE_TCB_SIZE);
# endif
#else
/* Prevent warnings. */
@@ -612,7 +612,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
{
#ifdef USE_TLS
# if TLS_DTV_AT_TP
- ++new_thread;
+ new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
# endif
_dl_deallocate_tls (new_thread, true);
#endif
@@ -643,7 +643,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
new_thread->p_header.data.self = new_thread;
#endif
#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
- new_thread->p_multiple_threads = 1;
+ p_multiple_threads (new_thread) = 1;
#endif
new_thread->p_tid = new_thread_id;
new_thread->p_lock = &(__pthread_handles[sseg].h_lock);
@@ -806,7 +806,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
}
#ifdef USE_TLS
# if TLS_DTV_AT_TP
- ++new_thread;
+ new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
# endif
_dl_deallocate_tls (new_thread, true);
#endif
@@ -896,7 +896,7 @@ static void pthread_free(pthread_descr th)
#ifdef USE_TLS
# if TLS_DTV_AT_TP
- ++th;
+ th = (pthread_descr) ((char *) th + TLS_PRE_TCB_SIZE);
# endif
_dl_deallocate_tls (th, true);
#endif