about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-19 22:49:55 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-19 22:49:55 +0000
commit13880b3014cddd3700e4186a3e07aa6146863b02 (patch)
treec89963bd4de4b9d78f0a9f12b796cf7fb3b5105b
parent7e1f8b2ea1c2ac251055574274ef5fda8ab1b57c (diff)
downloadglibc-13880b3014cddd3700e4186a3e07aa6146863b02.tar.gz
glibc-13880b3014cddd3700e4186a3e07aa6146863b02.tar.xz
glibc-13880b3014cddd3700e4186a3e07aa6146863b02.zip
(allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo in new TCB.
-rw-r--r--nptl/allocatestack.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 2dfecf0181..eabc68517a 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/param.h>
+#include <dl-sysdep.h>
 #include <tls.h>
 
 
@@ -275,6 +276,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
       /* There is at least one more thread.  */
       pd->header.data.multiple_threads = 1;
 
+#ifdef NEED_DL_SYSINFO
+      /* Copy the sysinfo value from the parent.  */
+      pd->header.data.sysinfo
+	= THREAD_GETMEM (THREAD_SELF, header.data.sysinfo);
+#endif
+
       /* Allocate the DTV for this thread.  */
       if (_dl_allocate_tls (pd) == NULL)
 	/* Something went wrong.  */
@@ -343,6 +350,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	  /* There is at least one more thread.  */
 	  pd->header.data.multiple_threads = 1;
 
+#ifdef NEED_DL_SYSINFO
+	  /* Copy the sysinfo value from the parent.  */
+	  pd->header.data.sysinfo
+	    = THREAD_GETMEM (THREAD_SELF, header.data.sysinfo);
+#endif
+
 	  /* Allocate the DTV for this thread.  */
 	  if (_dl_allocate_tls (pd) == NULL)
 	    {