From 674b89786e04a4addc79d70e025848f1e0116a41 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Oct 2014 15:03:00 -0700 Subject: NPTL: Clean up THREAD_SYSINFO macros. --- nptl/allocatestack.c | 6 ++---- nptl/createthread.c | 2 +- nptl/nptl-init.c | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'nptl') diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index b19d9b3e95..8cf0274ca1 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -430,8 +430,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, #endif #ifdef NEED_DL_SYSINFO - /* Copy the sysinfo value from the parent. */ - THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO; + SETUP_THREAD_SYSINFO (pd); #endif /* The process ID is also the same as that of the caller. */ @@ -567,8 +566,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, #endif #ifdef NEED_DL_SYSINFO - /* Copy the sysinfo value from the parent. */ - THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO; + SETUP_THREAD_SYSINFO (pd); #endif /* Don't allow setxid until cloned. */ diff --git a/nptl/createthread.c b/nptl/createthread.c index e718e35a11..9eaf2ce9c3 100644 --- a/nptl/createthread.c +++ b/nptl/createthread.c @@ -234,7 +234,7 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr, } #ifdef NEED_DL_SYSINFO - assert (THREAD_SELF_SYSINFO == THREAD_SYSINFO (pd)); + CHECK_THREAD_SYSINFO (pd); #endif /* Determine whether the newly created threads has to be started diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index a39ec9a23d..b7d2197b3e 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -304,8 +304,10 @@ __pthread_initialize_minimal_internal (void) /* Minimal initialization of the thread descriptor. */ struct pthread *pd = THREAD_SELF; +#ifdef __NR_set_tid_address INTERNAL_SYSCALL_DECL (err); pd->pid = pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid); +#endif THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]); THREAD_SETMEM (pd, user_stack, true); if (LLL_LOCK_INITIALIZER != 0) -- cgit v1.2.3