aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2005-06-16 10:47:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-06-16 10:47:16 +0200
commitf51ab33b26d8b85676b2b4b7399f50e25a56a3c5 (patch)
tree068025a6babf6c3804c593a0a7fc2dc2d56cd4de /gcc
parentab129900a4ffcf11e054377a8ff277ca3aca6c94 (diff)
downloadgcc-f51ab33b26d8b85676b2b4b7399f50e25a56a3c5.zip
gcc-f51ab33b26d8b85676b2b4b7399f50e25a56a3c5.tar.gz
gcc-f51ab33b26d8b85676b2b4b7399f50e25a56a3c5.tar.bz2
s-tasren.adb (Exceptional_Complete_Rendezvous): Fix race condition.
2005-06-14 Arnaud Charlet <charlet@adacore.com> * s-tasren.adb (Exceptional_Complete_Rendezvous): Fix race condition. From-SVN: r101063
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/s-tasren.adb16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ada/s-tasren.adb b/gcc/ada/s-tasren.adb
index 6bdd8d2..7d3eb9f 100644
--- a/gcc/ada/s-tasren.adb
+++ b/gcc/ada/s-tasren.adb
@@ -1,6 +1,6 @@
------------------------------------------------------------------------------
-- --
--- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . R E N D E Z V O U S --
-- --
@@ -555,10 +555,11 @@ package body System.Tasking.Rendezvous is
procedure Exceptional_Complete_Rendezvous
(Ex : Ada.Exceptions.Exception_Id)
is
- Self_Id : constant Task_Id := STPO.Self;
- Entry_Call : Entry_Call_Link := Self_Id.Common.Call;
- Caller : Task_Id;
- Called_PO : STPE.Protection_Entries_Access;
+ Self_Id : constant Task_Id := STPO.Self;
+ Entry_Call : Entry_Call_Link := Self_Id.Common.Call;
+ Caller : Task_Id;
+ Called_PO : STPE.Protection_Entries_Access;
+ Acceptor_Prev_Priority : Integer;
Exception_To_Raise : Ada.Exceptions.Exception_Id := Ex;
Ceiling_Violation : Boolean;
@@ -720,15 +721,16 @@ package body System.Tasking.Rendezvous is
Self_Id.Common.Compiler_Data.Current_Excep);
end if;
+ Acceptor_Prev_Priority := Entry_Call.Acceptor_Prev_Priority;
Initialization.Wakeup_Entry_Caller (Self_Id, Entry_Call, Done);
+
STPO.Unlock (Caller);
if Single_Lock then
Unlock_RTS;
end if;
- Entry_Calls.Reset_Priority
- (Self_Id, Entry_Call.Acceptor_Prev_Priority);
+ Entry_Calls.Reset_Priority (Self_Id, Acceptor_Prev_Priority);
end if;
end if;