aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-tasatt.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-tasatt.adb')
-rw-r--r--gcc/ada/a-tasatt.adb58
1 files changed, 32 insertions, 26 deletions
diff --git a/gcc/ada/a-tasatt.adb b/gcc/ada/a-tasatt.adb
index b0ceb3de..5afab9e 100644
--- a/gcc/ada/a-tasatt.adb
+++ b/gcc/ada/a-tasatt.adb
@@ -419,17 +419,18 @@ package body Ada.Task_Attributes is
else
declare
- P : Access_Node := To_Access_Node (TT.Indirect_Attributes);
- W : Access_Wrapper;
+ P : Access_Node := To_Access_Node (TT.Indirect_Attributes);
+ W : Access_Wrapper;
+ Self_Id : constant Task_Id := POP.Self;
begin
- Defer_Abortion;
+ Defer_Abort (Self_Id);
POP.Lock_RTS;
while P /= null loop
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return To_Access_Wrapper (P.Wrapper).Value'Access;
end if;
@@ -450,13 +451,13 @@ package body Ada.Task_Attributes is
P.Next := To_Access_Node (TT.Indirect_Attributes);
TT.Indirect_Attributes := To_Access_Address (P);
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return W.Value'Access;
exception
when others =>
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
raise;
end;
end if;
@@ -496,10 +497,12 @@ package body Ada.Task_Attributes is
Set_Value (Initial_Value, T);
else
declare
- P, Q : Access_Node;
- W : Access_Wrapper;
+ P, Q : Access_Node;
+ W : Access_Wrapper;
+ Self_Id : constant Task_Id := POP.Self;
+
begin
- Defer_Abortion;
+ Defer_Abort (Self_Id);
POP.Lock_RTS;
Q := To_Access_Node (TT.Indirect_Attributes);
@@ -514,7 +517,7 @@ package body Ada.Task_Attributes is
W := To_Access_Wrapper (Q.Wrapper);
Free (W);
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return;
end if;
@@ -523,12 +526,12 @@ package body Ada.Task_Attributes is
end loop;
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
exception
when others =>
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
raise;
end;
end if;
@@ -581,11 +584,12 @@ package body Ada.Task_Attributes is
-- Not directly addressed
declare
- P : Access_Node := To_Access_Node (TT.Indirect_Attributes);
- W : Access_Wrapper;
+ P : Access_Node := To_Access_Node (TT.Indirect_Attributes);
+ W : Access_Wrapper;
+ Self_Id : constant Task_Id := POP.Self;
begin
- Defer_Abortion;
+ Defer_Abort (Self_Id);
POP.Lock_RTS;
while P /= null loop
@@ -593,7 +597,7 @@ package body Ada.Task_Attributes is
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
To_Access_Wrapper (P.Wrapper).Value := Val;
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return;
end if;
@@ -613,12 +617,12 @@ package body Ada.Task_Attributes is
TT.Indirect_Attributes := To_Access_Address (P);
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
exception
when others =>
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
raise;
end;
@@ -669,11 +673,12 @@ package body Ada.Task_Attributes is
-- Not directly addressed
declare
- P : Access_Node;
- Result : Attribute;
+ P : Access_Node;
+ Result : Attribute;
+ Self_Id : constant Task_Id := POP.Self;
begin
- Defer_Abortion;
+ Defer_Abort (Self_Id);
POP.Lock_RTS;
P := To_Access_Node (TT.Indirect_Attributes);
@@ -681,7 +686,7 @@ package body Ada.Task_Attributes is
if P.Instance = Access_Instance'(Local'Unchecked_Access) then
Result := To_Access_Wrapper (P.Wrapper).Value;
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return Result;
end if;
@@ -689,13 +694,13 @@ package body Ada.Task_Attributes is
end loop;
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
return Initial_Value;
exception
when others =>
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
raise;
end;
@@ -720,8 +725,9 @@ begin
declare
Two_To_J : Direct_Index_Vector;
+ Self_Id : constant Task_Id := POP.Self;
begin
- Defer_Abortion;
+ Defer_Abort (Self_Id);
-- Need protection for updating links to per-task initialization and
-- finalization routines, in case some task is being created or
@@ -798,6 +804,6 @@ begin
end if;
POP.Unlock_RTS;
- Undefer_Abortion;
+ Undefer_Abort (Self_Id);
end;
end Ada.Task_Attributes;