From: Ulrich Drepper Date: Thu, 19 Dec 2002 22:49:55 +0000 (+0000) Subject: (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo in new TCB. X-Git-Tag: upstream/2.20~13455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13880b3014cddd3700e4186a3e07aa6146863b02;p=platform%2Fupstream%2Flinaro-glibc.git (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo in new TCB. --- diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 2dfecf0..eabc685 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -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) {