summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-linux.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-17 12:12:07 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-17 12:12:07 +0000
commit028d088be6d8721aebf4b38f0413abd947364d9a (patch)
tree94263310c65cdb19e5a42d5786b5f6570f07bc65 /gcc/ada/s-taprop-linux.adb
parent187a44ec3e8ad404b63aca7fc343f011698ab2d5 (diff)
downloadgcc-028d088be6d8721aebf4b38f0413abd947364d9a.tar.gz
2009-04-17 Thomas Quinot <quinot@adacore.com>
* 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 <charlet@adacore.com> * 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
Diffstat (limited to 'gcc/ada/s-taprop-linux.adb')
-rw-r--r--gcc/ada/s-taprop-linux.adb14
1 files changed, 13 insertions, 1 deletions
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);