From 028d088be6d8721aebf4b38f0413abd947364d9a Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 17 Apr 2009 12:12:07 +0000 Subject: 2009-04-17 Thomas Quinot * exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special case for the case of an aggregate component, the attach call for the result is actually needed. * exp_aggr.adb (Backend_Processing_Possible): Backend processing for an array aggregate must be disabled if the component type requires controlled actions. * exp_ch3.adb: Minor reformatting 2009-04-17 Arnaud Charlet * s-taprop-tru64.adb, s-taprop-vms.adb, s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-posix.adb (Suspend_Until_True): Protect against early wakeup. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146254 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/s-taprop-linux.adb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gcc/ada/s-taprop-linux.adb') diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb index aebfcb65383..b9c3c5e6ae9 100644 --- a/gcc/ada/s-taprop-linux.adb +++ b/gcc/ada/s-taprop-linux.adb @@ -1083,7 +1083,19 @@ package body System.Task_Primitives.Operations is S.State := False; else S.Waiting := True; - Result := pthread_cond_wait (S.CV'Access, S.L'Access); + + loop + -- loop in case pthread_cond_wait returns earlier than + -- expected (e.g. in case of EINTR caused by a signal). + -- This should not happen on current implementation of pthread + -- under Linux, but POSIX does not guarantee it, so this may + -- change in the future. + + Result := pthread_cond_wait (S.CV'Access, S.L'Access); + pragma Assert (Result = 0 or else Result = EINTR); + + exit when not S.Waiting; + end loop; end if; Result := pthread_mutex_unlock (S.L'Access); -- cgit v1.2.1