This exception stack was once used by VMS, but isn't anymore.
No functional change.
Tested on x86_64-pc-linux-gnu, committed on trunk
2011-08-29 Tristan Gingold <[email protected]>
* s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
(Initialize_TCB): Remove Exc_Stack_Ptr initialization.
(Finalize_TCB): Remove its finalization.
(Initialize): Remove assignment of GET_Exc_Stack_Addr
* s-soflin.adb (NT_Exc_Stack): Remove
(Get_Exc_Stack_Addr_NT): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise.
* s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
(Get_Exc_Stack_Addr): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise
* s-taspri-vms.ads (Exc_Stack_T): Remove.
(Exc_Stack_Ptr_T): Likewise.
(Private_Data): Remove Exc_Stack_Ptr component.
Index: s-taprop-vms.adb
===================================================================
--- s-taprop-vms.adb (revision 178155)
+++ s-taprop-vms.adb (working copy)
@@ -136,9 +136,6 @@
new Ada.Unchecked_Conversion
(Task_Id, System.Task_Primitives.Task_Address);
- function Get_Exc_Stack_Addr return Address;
- -- Replace System.Soft_Links.Get_Exc_Stack_Addr_NT
-
procedure Timer_Sleep_AST (ID : Address);
pragma Convention (C, Timer_Sleep_AST);
-- Signal the condition variable when AST fires
@@ -755,7 +752,6 @@
if Result = 0 then
Succeeded := True;
- Self_ID.Common.LL.Exc_Stack_Ptr := new Exc_Stack_T;
else
if not Single_Lock then
@@ -770,15 +766,6 @@
pragma Assert (Result = 0);
end Initialize_TCB;
- ------------------------
- -- Get_Exc_Stack_Addr --
- ------------------------
-
- function Get_Exc_Stack_Addr return Address is
- begin
- return Self.Common.LL.Exc_Stack_Ptr (Exc_Stack_T'Last)'Address;
- end Get_Exc_Stack_Addr;
-
-----------------
-- Create_Task --
-----------------
@@ -859,9 +846,6 @@
procedure Free is new
Ada.Unchecked_Deallocation (Ada_Task_Control_Block, Task_Id);
- procedure Free is new Ada.Unchecked_Deallocation
- (Exc_Stack_T, Exc_Stack_Ptr_T);
-
begin
if not Single_Lock then
Result := pthread_mutex_destroy (T.Common.LL.L'Access);
@@ -875,7 +859,6 @@
Known_Tasks (T.Known_Tasks_Index) := null;
end if;
- Free (T.Common.LL.Exc_Stack_Ptr);
Free (Tmp);
if Is_Self then
@@ -1247,8 +1230,6 @@
begin
Environment_Task_Id := Environment_Task;
- SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access;
-
-- Initialize the lock used to synchronize chain of all ATCBs
Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level);
Index: s-soflin.adb
===================================================================
--- s-soflin.adb (revision 178155)
+++ s-soflin.adb (working copy)
@@ -46,11 +46,6 @@
package SST renames System.Secondary_Stack;
- NT_Exc_Stack : array (0 .. 8192) of aliased Character;
- for NT_Exc_Stack'Alignment use Standard'Maximum_Alignment;
- -- Allocate an exception stack for the main program to use.
- -- This is currently only used under VMS.
-
NT_TSD : TSD;
-- Note: we rely on the default initialization of NT_TSD
@@ -173,24 +168,6 @@
return NT_TSD.Current_Excep'Access;
end Get_Current_Excep_NT;
- ---------------------------
- -- Get_Exc_Stack_Addr_NT --
- ---------------------------
-
- function Get_Exc_Stack_Addr_NT return Address is
- begin
- return NT_Exc_Stack (NT_Exc_Stack'Last)'Address;
- end Get_Exc_Stack_Addr_NT;
-
- -----------------------------
- -- Get_Exc_Stack_Addr_Soft --
- -----------------------------
-
- function Get_Exc_Stack_Addr_Soft return Address is
- begin
- return Get_Exc_Stack_Addr.all;
- end Get_Exc_Stack_Addr_Soft;
-
------------------------
-- Get_GNAT_Exception --
------------------------
Index: s-soflin.ads
===================================================================
--- s-soflin.ads (revision 178155)
+++ s-soflin.ads (working copy)
@@ -243,9 +243,6 @@
Get_Sec_Stack_Addr : Get_Address_Call := Get_Sec_Stack_Addr_NT'Access;
Set_Sec_Stack_Addr : Set_Address_Call := Set_Sec_Stack_Addr_NT'Access;
- function Get_Exc_Stack_Addr_NT return Address;
- Get_Exc_Stack_Addr : Get_Address_Call := Get_Exc_Stack_Addr_NT'Access;
-
function Get_Current_Excep_NT return EOA;
Get_Current_Excep : Get_EOA_Call := Get_Current_Excep_NT'Access;
@@ -389,8 +386,6 @@
pragma Inline (Get_Sec_Stack_Addr_Soft);
pragma Inline (Set_Sec_Stack_Addr_Soft);
- function Get_Exc_Stack_Addr_Soft return Address;
-
-- The following is a dummy record designed to mimic Communication_Block as
-- defined in s-tpobop.ads:
Index: s-taspri-vms.ads
===================================================================
--- s-taspri-vms.ads (revision 178155)
+++ s-taspri-vms.ads (working copy)
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1991-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1991-2011, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -78,10 +78,6 @@
private
- type Exc_Stack_T is array (0 .. 8192) of aliased Character;
- for Exc_Stack_T'Alignment use Standard'Maximum_Alignment;
- type Exc_Stack_Ptr_T is access all Exc_Stack_T;
-
type Lock is record
L : aliased System.OS_Interface.pthread_mutex_t;
Prio : Interfaces.C.int;
@@ -121,9 +117,6 @@
L : aliased RTS_Lock;
-- Protection for all components is lock L
- Exc_Stack_Ptr : Exc_Stack_Ptr_T;
- -- ??? This needs comments
-
AST_Pending : Boolean;
-- Used to detect delay and sleep timeouts