aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/createthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread/createthread.c')
-rw-r--r--nptl/sysdeps/pthread/createthread.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c
index beee434c62..2fac2d1a4e 100644
--- a/nptl/sysdeps/pthread/createthread.c
+++ b/nptl/sysdeps/pthread/createthread.c
@@ -42,7 +42,7 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS)
PREPARE_CREATE;
#endif
- assert (pd->header.data.tcb != NULL);
+ assert (pd->tcb != NULL);
if (__builtin_expect (THREAD_GETMEM (THREAD_SELF, report_events), 0))
@@ -70,8 +70,12 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS)
/* Failed. */
return errno;
+#ifdef TLS_MULTIPLE_THREADS_IN_TCB
/* We now have for sure more than one thread. */
- pd->header.data.multiple_threads = 1;
+ pd->multiple_threads = 1;
+#else
+ __pthread_multiple_threads = __libc_multiple_threads = 1;
+#endif
/* Now fill in the information about the new thread in
the newly created thread's data structure. We cannot let
@@ -97,8 +101,7 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS)
}
#ifdef NEED_DL_SYSINFO
- assert (THREAD_GETMEM (THREAD_SELF, header.data.sysinfo)
- == pd->header.data.sysinfo);
+ assert (THREAD_GETMEM (THREAD_SELF, sysinfo) == pd->sysinfo);
#endif
/* We rely heavily on various flags the CLONE function understands:
@@ -139,8 +142,10 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS)
/* Failed. */
return errno;
+#ifdef TLS_MULTIPLE_THREADS_IN_TCB
/* We now have for sure more than one thread. */
- THREAD_SETMEM (THREAD_SELF, header.data.multiple_threads, 1);
+ THREAD_SETMEM (THREAD_SELF, multiple_threads, 1);
+#endif
return 0;
}