Commit 3a2b1457 by Arnaud Charlet

[multiple changes]

2015-11-18  Ed Falis  <falis@adacore.com>

	* s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.

2015-11-18  Gary Dismukes  <dismukes@adacore.com>

	* bcheck.adb: Minor editorial changes.

From-SVN: r230528
parent 5a99fda7
2015-11-18 Ed Falis <falis@adacore.com>
* s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
2015-11-18 Gary Dismukes <dismukes@adacore.com>
* bcheck.adb: Minor editorial changes.
2015-11-18 Arnaud Charlet <charlet@adacore.com> 2015-11-18 Arnaud Charlet <charlet@adacore.com>
* interfac.ads (Unsigned_24): New type. * interfac.ads (Unsigned_24): New type.
......
...@@ -453,7 +453,7 @@ package body Bcheck is ...@@ -453,7 +453,7 @@ package body Bcheck is
-- 2. The with'ed unit was compiled with dynamic elaboration checks -- 2. The with'ed unit was compiled with dynamic elaboration checks
-- 3. The with'ed unit has pragma Preelaborate or Pure -- 3. The with'ed unit has pragma Preelaborate or Pure
-- 4. It is an internal GNAT unit (including children of GNAT) -- 4. It is an internal GNAT unit (including children of GNAT)
-- 5. It is an interface of a Stand-Aline Library -- 5. It is an interface of a Stand-Alone Library
procedure Check_Consistent_Dynamic_Elaboration_Checking is procedure Check_Consistent_Dynamic_Elaboration_Checking is
begin begin
......
...@@ -49,6 +49,12 @@ package body System.Soft_Links is ...@@ -49,6 +49,12 @@ package body System.Soft_Links is
NT_TSD : TSD; NT_TSD : TSD;
-- Note: we rely on the default initialization of NT_TSD -- Note: we rely on the default initialization of NT_TSD
-- Needed for Vx6Cert (Vx653mc) GOS cert and ravenscar-cert runtimes,
-- VxMILS cert, ravenscar-cert and full runtimes, Vx 5 default runtime
Stack_Limit : aliased System.Address;
pragma Export (C, Stack_Limit, "__gnat_stack_limit");
-------------------- --------------------
-- Abort_Defer_NT -- -- Abort_Defer_NT --
-------------------- --------------------
......
...@@ -60,10 +60,9 @@ package body System.Stack_Checking.Operations is ...@@ -60,10 +60,9 @@ package body System.Stack_Checking.Operations is
-- VxWorks MILS includes the necessary routine in taskLib, so nothing -- VxWorks MILS includes the necessary routine in taskLib, so nothing
-- special needs to be done there. -- special needs to be done there.
Stack_Limit : Address := Stack_Limit : Address;
Boolean'Pos (Stack_Grows_Down) * Address'First
+ Boolean'Pos (not Stack_Grows_Down) * Address'Last; pragma Import (C, Stack_Limit, "__gnat_stack_limit");
pragma Export (C, Stack_Limit, "__gnat_stack_limit");
-- Stack_Limit contains the limit of the stack. This variable is later made -- Stack_Limit contains the limit of the stack. This variable is later made
-- a task variable (by calling taskVarAdd) and then correctly set to the -- a task variable (by calling taskVarAdd) and then correctly set to the
...@@ -91,7 +90,6 @@ package body System.Stack_Checking.Operations is ...@@ -91,7 +90,6 @@ package body System.Stack_Checking.Operations is
procedure Initialize_Stack_Limit is procedure Initialize_Stack_Limit is
begin begin
-- For the environment task
Set_Stack_Limit_For_Current_Task; Set_Stack_Limit_For_Current_Task;
...@@ -126,6 +124,7 @@ package body System.Stack_Checking.Operations is ...@@ -126,6 +124,7 @@ package body System.Stack_Checking.Operations is
Limit : System.Address; Limit : System.Address;
begin begin
-- Get stack bounds from VxWorks -- Get stack bounds from VxWorks
Get_Stack_Info (Stack_Info'Access); Get_Stack_Info (Stack_Info'Access);
...@@ -141,6 +140,6 @@ package body System.Stack_Checking.Operations is ...@@ -141,6 +140,6 @@ package body System.Stack_Checking.Operations is
end if; end if;
Stack_Limit := Limit; Stack_Limit := Limit;
end Set_Stack_Limit_For_Current_Task;
end Set_Stack_Limit_For_Current_Task;
end System.Stack_Checking.Operations; end System.Stack_Checking.Operations;
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