mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-01 17:30:07 +00:00
468777e1d0
* pthread.c (__pthread_initialize_manager): Subtract TLS_PRE_TCB_SIZE bytes from tcbp to get to descr. * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr). (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr). * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
25 lines
520 B
Plaintext
25 lines
520 B
Plaintext
#include <sysdep.h>
|
|
#include <tls.h>
|
|
|
|
--
|
|
|
|
-- This could go into powerpc32/ instead and conditionalize #include of it.
|
|
#ifndef __powerpc64__
|
|
|
|
# ifdef USE_TLS
|
|
|
|
-- Abuse tls.h macros to derive offsets relative to the thread register.
|
|
# undef __thread_register
|
|
# define __thread_register ((void *) 0)
|
|
# define thread_offsetof(mem) ((void *) &THREAD_SELF->p_##mem - (void *) 0)
|
|
|
|
# else
|
|
|
|
# define thread_offsetof(mem) offsetof (tcbhead_t, mem)
|
|
|
|
# endif
|
|
|
|
MULTIPLE_THREADS_OFFSET thread_offsetof (multiple_threads)
|
|
|
|
#endif
|