diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-07 23:27:46 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-07 23:36:40 +0000 |
commit | af27fabe405c757d372b106c8aa383a386a4a79e (patch) | |
tree | cd019d303cfa25d12637c46c4bd109f82e819032 /sysdeps/htl | |
parent | 3944c61bdf5d1530d0576a396eb3e2f9a4d6caff (diff) | |
download | glibc-af27fabe405c757d372b106c8aa383a386a4a79e.zip glibc-af27fabe405c757d372b106c8aa383a386a4a79e.tar.gz glibc-af27fabe405c757d372b106c8aa383a386a4a79e.tar.bz2 |
htl: Fix tls initialization for already-created threads
* sysdeps/htl/pthreadP.h: Include <link.h>
(__pthread_init_static_tls): New prototype.
* htl/pt-alloc.c (__pthread_init_static_tls): New function.
* sysdeps/mach/hurd/htl/pt-sysdep.c (_init_routine): Initialize tcb
field of initial thread. Set GL(dl_init_static_tls) to
&__pthread_init_static_tls.
Diffstat (limited to 'sysdeps/htl')
-rw-r--r-- | sysdeps/htl/pthreadP.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 7486c93..0eb969e 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -22,10 +22,13 @@ #define __PTHREAD_HTL #include <pthread.h> +#include <link.h> /* Attribute to indicate thread creation was issued from C11 thrd_create. */ #define ATTR_C11_THREAD ((void*)(uintptr_t)-1) +extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; + /* These represent the interface used by glibc itself. */ extern pthread_t __pthread_self (void); |