Commit cc8be39e by Jose Ruiz Committed by Arnaud Charlet

s-tasini.adb (Get_Stack_Info): Move this function to System.Soft_Links.Tasking…

s-tasini.adb (Get_Stack_Info): Move this function to System.Soft_Links.Tasking because it is common to the...

2007-08-14  Jose Ruiz  <ruiz@adacore.com>

	* s-tasini.adb (Get_Stack_Info): Move this function to
	System.Soft_Links.Tasking because it is common to the full and the
	restricted run times.
	(Init_RTS): Do not set the Get_Stack_Info soft link because it is done
	in SSL.Tasking.Init_Tasking_Soft_Links.

	* s-solita.adb (Get_Stack_Info): Function moved from
	System.Tasking.Initialization because it is common to the full and the
	restricted run times.
	(Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.

From-SVN: r127463
parent 95dd3302
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2004-2006, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2007, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -48,6 +48,9 @@ with System.Tasking; ...@@ -48,6 +48,9 @@ with System.Tasking;
-- Used for Task_Id -- Used for Task_Id
-- Cause_Of_Termination -- Cause_Of_Termination
with System.Stack_Checking;
-- Used for Stack_Access
with Ada.Exceptions; with Ada.Exceptions;
-- Used for Exception_Id -- Used for Exception_Id
-- Exception_Occurrence -- Exception_Occurrence
...@@ -91,6 +94,9 @@ package body System.Soft_Links.Tasking is ...@@ -91,6 +94,9 @@ package body System.Soft_Links.Tasking is
procedure Task_Termination_Handler_T (Excep : SSL.EO); procedure Task_Termination_Handler_T (Excep : SSL.EO);
-- Task-safe version of the task termination procedure -- Task-safe version of the task termination procedure
function Get_Stack_Info return Stack_Checking.Stack_Access;
-- Get access to the current task's Stack_Info
-------------------------- --------------------------
-- Soft-Link Get Bodies -- -- Soft-Link Get Bodies --
-------------------------- --------------------------
...@@ -105,6 +111,11 @@ package body System.Soft_Links.Tasking is ...@@ -105,6 +111,11 @@ package body System.Soft_Links.Tasking is
return STPO.Self.Common.Compiler_Data.Sec_Stack_Addr; return STPO.Self.Common.Compiler_Data.Sec_Stack_Addr;
end Get_Sec_Stack_Addr; end Get_Sec_Stack_Addr;
function Get_Stack_Info return Stack_Checking.Stack_Access is
begin
return STPO.Self.Common.Compiler_Data.Pri_Stack_Info'Access;
end Get_Stack_Info;
-------------------------- --------------------------
-- Soft-Link Set Bodies -- -- Soft-Link Set Bodies --
-------------------------- --------------------------
...@@ -208,6 +219,7 @@ package body System.Soft_Links.Tasking is ...@@ -208,6 +219,7 @@ package body System.Soft_Links.Tasking is
SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access; SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access;
SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access; SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access;
SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access;
SSL.Get_Stack_Info := Get_Stack_Info'Access;
SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access;
SSL.Timed_Delay := Timed_Delay_T'Access; SSL.Timed_Delay := Timed_Delay_T'Access;
SSL.Task_Termination_Handler := Task_Termination_Handler_T'Access; SSL.Task_Termination_Handler := Task_Termination_Handler_T'Access;
......
...@@ -62,8 +62,6 @@ with System.Soft_Links.Tasking; ...@@ -62,8 +62,6 @@ with System.Soft_Links.Tasking;
with System.Tasking.Debug; with System.Tasking.Debug;
-- Used for Trace -- Used for Trace
with System.Stack_Checking;
with System.Parameters; with System.Parameters;
-- used for Single_Lock -- used for Single_Lock
...@@ -104,9 +102,6 @@ package body System.Tasking.Initialization is ...@@ -104,9 +102,6 @@ package body System.Tasking.Initialization is
-- all nested locks must be released before other tasks competing for the -- all nested locks must be released before other tasks competing for the
-- tasking lock are released. -- tasking lock are released.
function Get_Stack_Info return Stack_Checking.Stack_Access;
-- Get access to the current task's Stack_Info
function Get_Current_Excep return SSL.EOA; function Get_Current_Excep return SSL.EOA;
-- Task-safe version of SSL.Get_Current_Excep -- Task-safe version of SSL.Get_Current_Excep
...@@ -382,7 +377,6 @@ package body System.Tasking.Initialization is ...@@ -382,7 +377,6 @@ package body System.Tasking.Initialization is
SSL.Lock_Task := Task_Lock'Access; SSL.Lock_Task := Task_Lock'Access;
SSL.Unlock_Task := Task_Unlock'Access; SSL.Unlock_Task := Task_Unlock'Access;
SSL.Check_Abort_Status := Check_Abort_Status'Access; SSL.Check_Abort_Status := Check_Abort_Status'Access;
SSL.Get_Stack_Info := Get_Stack_Info'Access;
SSL.Task_Name := Task_Name'Access; SSL.Task_Name := Task_Name'Access;
SSL.Update_Exception := Update_Exception'Access; SSL.Update_Exception := Update_Exception'Access;
SSL.Get_Current_Excep := Get_Current_Excep'Access; SSL.Get_Current_Excep := Get_Current_Excep'Access;
...@@ -823,15 +817,6 @@ package body System.Tasking.Initialization is ...@@ -823,15 +817,6 @@ package body System.Tasking.Initialization is
end if; end if;
end Wakeup_Entry_Caller; end Wakeup_Entry_Caller;
----------------------
-- Soft-Link Bodies --
----------------------
function Get_Stack_Info return Stack_Checking.Stack_Access is
begin
return STPO.Self.Common.Compiler_Data.Pri_Stack_Info'Access;
end Get_Stack_Info;
----------------------- -----------------------
-- Soft-Link Dummies -- -- Soft-Link Dummies --
----------------------- -----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment