about summary refs log tree commit diff
path: root/sysdeps/htl/pt-init-specific.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-08 12:10:06 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-08 12:17:48 +0200
commit644aa127b9b42a899a12b6ccc6644bc035c231e3 (patch)
tree46590a3c1c485dc2f423ded55671f4cb56bed532 /sysdeps/htl/pt-init-specific.c
parentdcad5c8578130dec7f35fd5b0885304b59f9f543 (diff)
downloadglibc-644aa127b9b42a899a12b6ccc6644bc035c231e3.tar.gz
glibc-644aa127b9b42a899a12b6ccc6644bc035c231e3.tar.xz
glibc-644aa127b9b42a899a12b6ccc6644bc035c231e3.zip
htl: Add support for static TSD data
When using jemalloc, malloc() needs to use TSD, while libpthread
initialization needs malloc(). Supporting a static TSD area allows jemalloc
and libpthread to initialize together.
Diffstat (limited to 'sysdeps/htl/pt-init-specific.c')
-rw-r--r--sysdeps/htl/pt-init-specific.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/htl/pt-init-specific.c b/sysdeps/htl/pt-init-specific.c
index 8c4d23cb13..ed6c6f2d0c 100644
--- a/sysdeps/htl/pt-init-specific.c
+++ b/sysdeps/htl/pt-init-specific.c
@@ -26,5 +26,7 @@ __pthread_init_specific (struct __pthread *thread)
 {
   thread->thread_specifics = 0;
   thread->thread_specifics_size = 0;
+  memset (&thread->static_thread_specifics, 0,
+	  sizeof (thread->static_thread_specifics));
   return 0;
 }