From: Richard Henderson Date: Mon, 9 May 2005 13:43:49 +0000 (-0700) Subject: backport: pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait. X-Git-Tag: releases/gcc-3.4.4~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61717cd876da2f0adc2fe20d89fed9dc8d893b4e;p=thirdparty%2Fgcc.git backport: pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait. Backport from mainline: 2005-02-07 Hans Boehm * pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait. From-SVN: r99439 --- diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index ac20a553819a..0486e4217f2b 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,9 @@ +2005-05-08 Richard Henderson + + Backport from mainline: + 2005-02-07 Hans Boehm + * pthread_stop_world.c (GC_stop_world): Handle EINTR from sem_wait. + 2005-04-17 David S. Miller * include/private/gcconfig.h (sparc-linux): Use LINUX_STACKBOTTOM. diff --git a/boehm-gc/pthread_stop_world.c b/boehm-gc/pthread_stop_world.c index 5dfd26d319a3..fd4a91ec2c9e 100644 --- a/boehm-gc/pthread_stop_world.c +++ b/boehm-gc/pthread_stop_world.c @@ -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