about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-27 21:14:41 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-27 21:14:41 +0000
commit18d009ca00eea5127f162b3179a529516a8445d2 (patch)
tree61619d90a1b39530bad8302d790815112a5dec72 /nptl
parent28cf305854fd91eaa5b5e16d23a612e094f02920 (diff)
downloadglibc-18d009ca00eea5127f162b3179a529516a8445d2.tar.gz
glibc-18d009ca00eea5127f162b3179a529516a8445d2.tar.xz
glibc-18d009ca00eea5127f162b3179a529516a8445d2.zip
Update.
	* pthread_create.c (start_thread): Don't use setjmp inside
	__builtin_expect to work around gcc bug.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog3
-rw-r--r--nptl/pthread_create.c3
-rw-r--r--nptl/sysdeps/s390/tls.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index fb404d938f..9490f86776 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,8 @@
 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
 
+	* pthread_create.c (start_thread): Don't use setjmp inside
+	__builtin_expect to work around gcc bug.
+
 	* sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
 	timer_delete syscall fails, but not with ENOSYS, set
 	__no_posix_timers.
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 41218745d6..8598e4c763 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -221,7 +221,8 @@ start_thread (void *arg)
 
   /* This is where the try/finally block should be created.  For
      compilers without that support we do use setjmp.  */
-  if (__builtin_expect (setjmp (pd->cancelbuf) == 0, 1))
+  int not_first_call = setjmp (pd->cancelbuf);
+  if (__builtin_expect (! not_first_call, 1))
     {
       /* Run the code the user provided.  */
 #ifdef CALL_THREAD_FCT
diff --git a/nptl/sysdeps/s390/tls.h b/nptl/sysdeps/s390/tls.h
index 3f31823496..06237ae15b 100644
--- a/nptl/sysdeps/s390/tls.h
+++ b/nptl/sysdeps/s390/tls.h
@@ -43,9 +43,9 @@ typedef struct
   dtv_t *dtv;
   void *self;		/* Pointer to the thread descriptor.  */
   int multiple_threads;
-#ifdef NEED_DL_SYSINFO
+# ifdef NEED_DL_SYSINFO
   uintptr_t sysinfo;
-#endif
+# endif
 } tcbhead_t;
 
 # ifndef __s390x__