aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-tarest.adb
diff options
context:
space:
mode:
authorJose Ruiz <ruiz@adacore.com>2007-06-06 12:46:22 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-06-06 12:46:22 +0200
commit72fb810db9de1e8abdabefdb524567ad2691568e (patch)
treeb73f1b3b905e546cc52e9c05f08a94134ce134ab /gcc/ada/s-tarest.adb
parentb9f3a4b07df15081483fd4caa5d1e29266917fa3 (diff)
downloadgcc-72fb810db9de1e8abdabefdb524567ad2691568e.zip
gcc-72fb810db9de1e8abdabefdb524567ad2691568e.tar.gz
gcc-72fb810db9de1e8abdabefdb524567ad2691568e.tar.bz2
s-taprob.adb (Unlock): Change the ceiling priority of the underlying lock, if needed.
2007-04-20 Jose Ruiz <ruiz@adacore.com> Arnaud Charlet <charlet@adacore.com> * s-taprob.adb (Unlock): Change the ceiling priority of the underlying lock, if needed. * s-taprop.ads (Set_Ceiling): Add this procedure to change the ceiling priority associated to a lock. * s-tpoben.adb ([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to take into account case of no abort restriction. (Initialize_Protection_Entries): Add initialization for the field New_Ceiling associated to the protected object. (Unlock_Entries): Change the ceiling priority of the underlying lock, if needed. * s-solita.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest, since this function needs to be set consistently with Update_Exception. * s-tarest.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest, since this function needs to be set consistently with Update_Exception. * s-taskin.ads: Update comments on Interrupt_Server_Blocked_On_Event_Flag. (Unbind_Handler): Fix handling of server_task wakeup (Server_Task): Set self's state so that Unbind_Handler can take appropriate actions. (Common_ATCB): Now use a constant from System.Parameters to determine the max size of the Task_Image field. * s-tassta.adb (Task_Wrapper): Now pass the overflow guard to the Initialize_Analyzer function. ([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to take into account case of no abort restriction. ([Vulnerable_]Complete_Master): Modify assertion. * s-tataat.adb (Finalize): Use the nestable versions of Defer/Undefer_Abort. * s-tpobop.adb (Protected_Entry_Call): Relax assertion. * s-tpobop.ads: Update comments. * s-tposen.adb (Protected_Single_Entry_Call): Call Lock_Entry instead of locking the object manually, to avoid inconsistencies between Lock/Unlock_Entry assertions. * s-interr.ads, s-interr.adb (Server_Task): Fix race condition when terminating application and System.Parameters.No_Abort is True. Update comments on Interrupt_Server_Blocked_On_Event_Flag. (Unbind_Handler): Fix handling of server_task wakeup (Server_Task): Set self's state so that Unbind_Handler can take appropriate actions. From-SVN: r125458
Diffstat (limited to 'gcc/ada/s-tarest.adb')
-rw-r--r--gcc/ada/s-tarest.adb19
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb
index ab64fa8..cfe0758 100644
--- a/gcc/ada/s-tarest.adb
+++ b/gcc/ada/s-tarest.adb
@@ -93,6 +93,9 @@ package body System.Tasking.Restricted.Stages is
-- Tasking versions of services needed by non-tasking programs --
-----------------------------------------------------------------
+ function Get_Current_Excep return SSL.EOA;
+ -- Task-safe version of SSL.Get_Current_Excep
+
procedure Task_Lock;
-- Locks out other tasks. Preceding a section of code by Task_Lock and
-- following it by Task_Unlock creates a critical region. This is used
@@ -126,6 +129,15 @@ package body System.Tasking.Restricted.Stages is
-- installing tasking versions of certain operations used by the compiler.
-- Init_RTS is called during elaboration.
+ -----------------------
+ -- Get_Current_Excep --
+ -----------------------
+
+ function Get_Current_Excep return SSL.EOA is
+ begin
+ return STPO.Self.Common.Compiler_Data.Current_Excep'Access;
+ end Get_Current_Excep;
+
---------------
-- Task_Lock --
---------------
@@ -616,9 +628,10 @@ package body System.Tasking.Restricted.Stages is
-- Notify that the tasking run time has been elaborated so that
-- the tasking version of the soft links can be used.
- SSL.Lock_Task := Task_Lock'Access;
- SSL.Unlock_Task := Task_Unlock'Access;
- SSL.Adafinal := Finalize_Global_Tasks'Access;
+ SSL.Lock_Task := Task_Lock'Access;
+ SSL.Unlock_Task := Task_Unlock'Access;
+ SSL.Adafinal := Finalize_Global_Tasks'Access;
+ SSL.Get_Current_Excep := Get_Current_Excep'Access;
-- Initialize the tasking soft links (if not done yet) that are common
-- to the full and the restricted run times.