diff options
author | Jose Ruiz <ruiz@adacore.com> | 2007-06-06 12:46:22 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-06-06 12:46:22 +0200 |
commit | 72fb810db9de1e8abdabefdb524567ad2691568e (patch) | |
tree | b73f1b3b905e546cc52e9c05f08a94134ce134ab /gcc/ada/s-tataat.adb | |
parent | b9f3a4b07df15081483fd4caa5d1e29266917fa3 (diff) | |
download | gcc-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-tataat.adb')
-rw-r--r-- | gcc/ada/s-tataat.adb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/s-tataat.adb b/gcc/ada/s-tataat.adb index c0dede8..1c67276 100644 --- a/gcc/ada/s-tataat.adb +++ b/gcc/ada/s-tataat.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2006, AdaCore -- +-- Copyright (C) 1995-2007, AdaCore -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -41,14 +41,14 @@ with System.Tasking.Initialization; -- used for Defer_Abort -- Undefer_Abort -with Unchecked_Conversion; +with Ada.Unchecked_Conversion; package body System.Tasking.Task_Attributes is use Task_Primitives.Operations; use Tasking.Initialization; - function To_Access_Address is new Unchecked_Conversion + function To_Access_Address is new Ada.Unchecked_Conversion (Access_Node, Access_Address); -- Store pointer to indirect attribute list @@ -61,10 +61,15 @@ package body System.Tasking.Task_Attributes is Self_Id : constant Task_Id := Self; begin - Defer_Abort (Self_Id); + -- Defer abort. Note that we use the nestable versions of Defer_Abort + -- and Undefer_Abort, because abort can already deferred when this is + -- called during finalization, which would cause an assert failure + -- in Defer_Abort. + + Defer_Abort_Nestable (Self_Id); Lock_RTS; - -- Remove this instantiation from the list of all instantiations. + -- Remove this instantiation from the list of all instantiations declare P : Access_Instance; @@ -85,7 +90,8 @@ package body System.Tasking.Task_Attributes is end; if X.Index /= 0 then - -- Free location of this attribute, for reuse. + + -- Free location of this attribute, for reuse In_Use := In_Use and not (2**Natural (X.Index)); @@ -140,7 +146,7 @@ package body System.Tasking.Task_Attributes is X.Deallocate.all (Q); end loop; - Undefer_Abort (Self_Id); + Undefer_Abort_Nestable (Self_Id); exception when others => |