summaryrefslogtreecommitdiff
path: root/gcc/ada/s-tasren.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-24 10:37:20 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-24 10:37:20 +0000
commitb9a4f824421cadf5132a85bb8ae27b45f15b2fc8 (patch)
tree75d2033d3b14ba196fe382fdbdb2908e8e8901a1 /gcc/ada/s-tasren.adb
parentcc285c23bb3bdcf559391b7a4179bb975f459aa7 (diff)
downloadgcc-b9a4f824421cadf5132a85bb8ae27b45f15b2fc8.tar.gz
2009-04-24 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Actuals): Do not create blocks around code statements, even though the actual of the call is a concatenation, because the argument is static, and we want to preserve warning messages about sequences of code statements that are not marked volatile. * sem_warn.adb: remove obsolete comment about warning being obsolete * s-tasren.adb (Task_Do_Or_Queue): If a timed entry call is being requeued and the delay has expired while within the accept statement that executes the requeue, do not perform the requeue and indicate that the timed call has been aborted. 2009-04-24 Emmanuel Briot <briot@adacore.com> * mlib-prj.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb (Has_Ada_Sources, Has_Foreign_Sources): new subprograms (Project_Data.Ada_Sources_Present, Foreign_Sources_Present): removed, since they can be computed from the above. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tasren.adb')
-rw-r--r--gcc/ada/s-tasren.adb42
1 files changed, 24 insertions, 18 deletions
diff --git a/gcc/ada/s-tasren.adb b/gcc/ada/s-tasren.adb
index 38f179d0e2e..7cdde56054d 100644
--- a/gcc/ada/s-tasren.adb
+++ b/gcc/ada/s-tasren.adb
@@ -1225,9 +1225,31 @@ package body System.Tasking.Rendezvous is
-- we would not have gotten this far, so now we should
-- (re)enqueue the call, if the mode permits that.
- if Entry_Call.Mode /= Conditional_Call
- or else not Entry_Call.With_Abort
+ -- If the call is timed, it may have timed out before the requeue,
+ -- in the unusual case where the current accept has taken longer than
+ -- the given delay. In that case the requeue is cancelled, and the
+ -- outer timed call will be aborted.
+
+ if Entry_Call.Mode = Conditional_Call
+ or else
+ (Entry_Call.Mode = Timed_Call
+ and then Entry_Call.With_Abort
+ and then Entry_Call.Cancellation_Attempted)
then
+ STPO.Unlock (Acceptor);
+
+ if Parent_Locked then
+ STPO.Unlock (Parent);
+ end if;
+
+ STPO.Write_Lock (Entry_Call.Self);
+
+ pragma Assert (Entry_Call.State >= Was_Abortable);
+
+ Initialization.Wakeup_Entry_Caller (Self_ID, Entry_Call, Cancelled);
+ STPO.Unlock (Entry_Call.Self);
+
+ else
-- Timed_Call, Simple_Call, or Asynchronous_Call
Queuing.Enqueue (Acceptor.Entry_Queues (E), Entry_Call);
@@ -1266,22 +1288,6 @@ package body System.Tasking.Rendezvous is
STPO.Unlock (Entry_Call.Self);
end if;
-
- else
- -- Conditional_Call and With_Abort
-
- STPO.Unlock (Acceptor);
-
- if Parent_Locked then
- STPO.Unlock (Parent);
- end if;
-
- STPO.Write_Lock (Entry_Call.Self);
-
- pragma Assert (Entry_Call.State >= Was_Abortable);
-
- Initialization.Wakeup_Entry_Caller (Self_ID, Entry_Call, Cancelled);
- STPO.Unlock (Entry_Call.Self);
end if;
return True;