-- This is the VxWorks version of this package.
-- This file should be kept synchronized with the general implementation
--- provided by s-stchop.adb.
+-- provided by s-stchop.adb. This version is for VxWorks 5 and VxWorks MILS.
pragma Restrictions (No_Elaboration_Code);
-- We want to guarantee the absence of elaboration code because the
package body System.Stack_Checking.Operations is
-- In order to have stack checking working appropriately on VxWorks we need
- -- to extract the stack size information from the VxWorks kernel itself. It
- -- means that the library for showing task-related information needs to be
- -- linked into the VxWorks system, when using stack checking. The TaskShow
- -- library can be linked into the VxWorks system by either:
+ -- to extract the stack size information from the VxWorks kernel itself.
+
+ -- For VxWorks 5 the library for showing task-related information needs to
+ -- be linked into the VxWorks system, when using stack checking. The
+ -- taskShow library can be linked into the VxWorks system by either:
-- * defining INCLUDE_SHOW_ROUTINES in config.h when using
-- configuration header files, or
-- * selecting INCLUDE_TASK_SHOW when using the Tornado project
-- facility.
+ -- VxWorks MILS includes the necessary routine in taskLib, so nothing
+ -- special needs to be done there.
+
Stack_Limit : Address :=
Boolean'Pos (Stack_Grows_Down) * Address'First
+ Boolean'Pos (not Stack_Grows_Down) * Address'Last;