mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user