]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 27 Mar 2003 21:14:41 +0000 (21:14 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 27 Mar 2003 21:14:41 +0000 (21:14 +0000)
* pthread_create.c (start_thread): Don't use setjmp inside
__builtin_expect to work around gcc bug.

nptl/ChangeLog
nptl/pthread_create.c
nptl/sysdeps/s390/tls.h

index fb404d938f601e328c3b45c3ef6ff392c04b803a..9490f86776b419e7b51c95283916f19f07cf78a7 100644 (file)
@@ -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.
index 41218745d6541a5594a31e970504cedd492073bb..8598e4c763e9d12186e67c4a74eb323233cf5d96 100644 (file)
@@ -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
index 3f3182349653f36f8d8f6bc55efccd8a39af195a..06237ae15b91f193d4cac5f04a9b2197edfb6aed 100644 (file)
@@ -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__