mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
(allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo in new TCB.
This commit is contained in:
parent
7e1f8b2ea1
commit
13880b3014
@ -24,6 +24,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#include <dl-sysdep.h>
|
||||||
#include <tls.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. */
|
/* There is at least one more thread. */
|
||||||
pd->header.data.multiple_threads = 1;
|
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. */
|
/* Allocate the DTV for this thread. */
|
||||||
if (_dl_allocate_tls (pd) == NULL)
|
if (_dl_allocate_tls (pd) == NULL)
|
||||||
/* Something went wrong. */
|
/* Something went wrong. */
|
||||||
@ -343,6 +350,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
/* There is at least one more thread. */
|
/* There is at least one more thread. */
|
||||||
pd->header.data.multiple_threads = 1;
|
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. */
|
/* Allocate the DTV for this thread. */
|
||||||
if (_dl_allocate_tls (pd) == NULL)
|
if (_dl_allocate_tls (pd) == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user