mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 20:31:36 +08:00
a-tasatt.adb: Revert previous change for this file as it will generate an error when...
gcc/ada/ * a-tasatt.adb: Revert previous change for this file as it will generate an error when this package is instantiated from a local context. From-SVN: r130076
This commit is contained in:
parent
9113fd7b18
commit
14678e4662
@ -1,3 +1,9 @@
|
||||
2007-11-10 Samuel Tardieu <sam@rfc1149.net>
|
||||
|
||||
* a-tasatt.adb: Revert previous change for this file as it will
|
||||
generate an error when this package is instantiated from a
|
||||
local context.
|
||||
|
||||
2007-11-07 Samuel Tardieu <sam@rfc1149.net>
|
||||
|
||||
* a-tasatt.adb: Type Wrapper should be declared in comment instead
|
||||
|
@ -415,7 +415,7 @@ package body Ada.Task_Attributes is
|
||||
POP.Lock_RTS;
|
||||
|
||||
while P /= null loop
|
||||
if P.Instance = Access_Instance'(Local'Access) then
|
||||
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
|
||||
POP.Unlock_RTS;
|
||||
Undefer_Abort (Self_Id);
|
||||
return To_Access_Wrapper (P.Wrapper).Value'Access;
|
||||
@ -429,10 +429,11 @@ package body Ada.Task_Attributes is
|
||||
-- holding any other lock.
|
||||
|
||||
POP.Unlock_RTS;
|
||||
W := new Wrapper'((null, Local'Access, null), Initial_Value);
|
||||
W := new Wrapper'
|
||||
((null, Local'Unchecked_Access, null), Initial_Value);
|
||||
POP.Lock_RTS;
|
||||
|
||||
P := W.Dummy_Node'Access;
|
||||
P := W.Dummy_Node'Unchecked_Access;
|
||||
P.Wrapper := To_Access_Dummy_Wrapper (W);
|
||||
P.Next := To_Access_Node (TT.Indirect_Attributes);
|
||||
TT.Indirect_Attributes := To_Access_Address (P);
|
||||
@ -493,7 +494,7 @@ package body Ada.Task_Attributes is
|
||||
Q := To_Access_Node (TT.Indirect_Attributes);
|
||||
|
||||
while Q /= null loop
|
||||
if Q.Instance = Access_Instance'(Local'Access) then
|
||||
if Q.Instance = Access_Instance'(Local'Unchecked_Access) then
|
||||
if P = null then
|
||||
TT.Indirect_Attributes := To_Access_Address (Q.Next);
|
||||
else
|
||||
@ -580,7 +581,7 @@ package body Ada.Task_Attributes is
|
||||
|
||||
while P /= null loop
|
||||
|
||||
if P.Instance = Access_Instance'(Local'Access) then
|
||||
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
|
||||
To_Access_Wrapper (P.Wrapper).Value := Val;
|
||||
POP.Unlock_RTS;
|
||||
Undefer_Abort (Self_Id);
|
||||
@ -594,9 +595,9 @@ package body Ada.Task_Attributes is
|
||||
-- from using new (i.e the Global_Lock) while holding any other lock.
|
||||
|
||||
POP.Unlock_RTS;
|
||||
W := new Wrapper'((null, Local'Access, null), Val);
|
||||
W := new Wrapper'((null, Local'Unchecked_Access, null), Val);
|
||||
POP.Lock_RTS;
|
||||
P := W.Dummy_Node'Access;
|
||||
P := W.Dummy_Node'Unchecked_Access;
|
||||
P.Wrapper := To_Access_Dummy_Wrapper (W);
|
||||
P.Next := To_Access_Node (TT.Indirect_Attributes);
|
||||
TT.Indirect_Attributes := To_Access_Address (P);
|
||||
@ -668,7 +669,7 @@ package body Ada.Task_Attributes is
|
||||
P := To_Access_Node (TT.Indirect_Attributes);
|
||||
|
||||
while P /= null loop
|
||||
if P.Instance = Access_Instance'(Local'Access) then
|
||||
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
|
||||
Result := To_Access_Wrapper (P.Wrapper).Value;
|
||||
POP.Unlock_RTS;
|
||||
Undefer_Abort (Self_Id);
|
||||
@ -723,7 +724,8 @@ begin
|
||||
-- Add this instantiation to the list of all instantiations
|
||||
|
||||
Local.Next := System.Tasking.Task_Attributes.All_Attributes;
|
||||
System.Tasking.Task_Attributes.All_Attributes := Local'Access;
|
||||
System.Tasking.Task_Attributes.All_Attributes :=
|
||||
Local'Unchecked_Access;
|
||||
|
||||
-- Try to find space for the attribute in the TCB
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user