diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-16 08:47:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-16 08:47:16 +0000 |
commit | 376ed734127eeee08b2d046dd60acfb2e89946aa (patch) | |
tree | 068025a6babf6c3804c593a0a7fc2dc2d56cd4de /gcc/ada/s-tasren.adb | |
parent | 1b33a3e8faa653e4e080710242d6a47c95300cc6 (diff) | |
download | gcc-376ed734127eeee08b2d046dd60acfb2e89946aa.tar.gz |
2005-06-14 Arnaud Charlet <charlet@adacore.com>
* s-tasren.adb (Exceptional_Complete_Rendezvous): Fix race condition.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101063 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tasren.adb')
-rw-r--r-- | gcc/ada/s-tasren.adb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ada/s-tasren.adb b/gcc/ada/s-tasren.adb index 6bdd8d27738..7d3eb9f4d6f 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; |