]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait.
authorRichard Henderson <rth@redhat.com>
Mon, 9 May 2005 13:43:49 +0000 (06:43 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 9 May 2005 13:43:49 +0000 (06:43 -0700)
        Backport from mainline:
        2005-02-07  Hans Boehm  <Hans.Boehm@hp.com>
        * pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait.

From-SVN: r99439

boehm-gc/ChangeLog
boehm-gc/pthread_stop_world.c

index ac20a553819ab37fa444529e326f990acd5deb03..0486e4217f2baef1b1d35adba367a154b16bb8ae 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-08  Richard Henderson  <rth@redhat.com>
+
+       Backport from mainline:
+       2005-02-07  Hans Boehm  <Hans.Boehm@hp.com>
+       * pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait.
+
 2005-04-17  David S. Miller  <davem@davemloft.net>
 
        * include/private/gcconfig.h (sparc-linux): Use LINUX_STACKBOTTOM.
index 5dfd26d319a3f54f6acf4c2f921583606ce34c30..fd4a91ec2c9e35c81313ff8e4dc41a2e04b7b3a1 100644 (file)
@@ -341,9 +341,11 @@ void GC_stop_world()
          }
       }
     for (i = 0; i < n_live_threads; i++) {
-         if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
+         while (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
+           if (errno != EINTR) {
              GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code);
              ABORT("sem_wait for handler failed");
+           }
          }
     }
 #   ifdef PARALLEL_MARK