about summary refs log tree commit diff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-25 07:44:41 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-25 07:44:41 +0000
commit5f66b766e7b1929b07ab3e0374a9a627a45c9be6 (patch)
tree337255bdc09e5c1f32039ae5f732eeef8059de79 /nptl/pthread_create.c
parent51499423041892397b8ee123bbe45fd8eadda534 (diff)
downloadglibc-5f66b766e7b1929b07ab3e0374a9a627a45c9be6.tar.gz
glibc-5f66b766e7b1929b07ab3e0374a9a627a45c9be6.tar.xz
glibc-5f66b766e7b1929b07ab3e0374a9a627a45c9be6.zip
Update.
2004-09-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second
	result declaration.

2004-09-22  Andreas Schwab  <schwab@suse.de>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 34cc37d527..1bab72d1e9 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -252,14 +252,17 @@ start_thread (void *arg)
       /* Store the new cleanup handler info.  */
       THREAD_SETMEM (pd, cleanup_jmp_buf, &unwind_buf);
 
-      int oldtype = CANCEL_ASYNC ();
+      if (__builtin_expect (pd->stopped_start, 0))
+	{
+	  int oldtype = CANCEL_ASYNC ();
 
-      /* Get the lock the parent locked to force synchronization.  */
-      lll_lock (pd->lock);
-      /* And give it up right away.  */
-      lll_unlock (pd->lock);
+	  /* Get the lock the parent locked to force synchronization.  */
+	  lll_lock (pd->lock);
+	  /* And give it up right away.  */
+	  lll_unlock (pd->lock);
 
-      CANCEL_RESET (oldtype);
+	  CANCEL_RESET (oldtype);
+	}
 
       /* Run the code the user provided.  */
 #ifdef CALL_THREAD_FCT