diff options
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r-- | nptl/pthread_create.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index ae97f4a62d..8507c3bf1d 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -33,8 +33,6 @@ /* Local function to start thread and handle cleanup. */ static int start_thread (void *arg); -/* Similar version used when debugging. */ -static int start_thread_debug (void *arg); /* Nozero if debugging mode is enabled. */ @@ -232,6 +230,13 @@ start_thread (void *arg) struct pthread *pd = (struct pthread *) arg; +#ifndef __ASSUME_CLONE_STOPPED + /* Get the lock the parent locked to force synchronization. */ + lll_lock (pd->lock); + /* And give it up right away. */ + lll_unlock (pd->lock); +#endif + #if HP_TIMING_AVAIL /* Remember the time when the thread was started. */ hp_timing_t now; @@ -331,23 +336,6 @@ start_thread (void *arg) } -/* Just list start_thread but we do some more things needed for a run - with a debugger attached. */ -static int -start_thread_debug (void *arg) -{ - struct pthread *pd = (struct pthread *) arg; - - /* Get the lock the parent locked to force synchronization. */ - lll_lock (pd->lock); - /* And give it up right away. */ - lll_unlock (pd->lock); - - /* Now do the actual startup. */ - return start_thread (arg); -} - - /* Default thread attributes for the case when the user does not provide any. */ static const struct pthread_attr default_attr = |