File : g-secsta-minimal.ads


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                         GNAT RUN-TIME COMPONENTS                         --
   4 --                                                                          --
   5 --                 G N A T . S E C O N D A R Y _ S T A C K                  --
   6 --                                                                          --
   7 --                                 S p e c                                  --
   8 --                                                                          --
   9 --                        Copyright (C) 2013, AdaCore                       --
  10 --                                                                          --
  11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  12 -- terms of the  GNU General Public License as published  by the Free Soft- --
  13 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  16 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  17 --                                                                          --
  18 --                                                                          --
  19 --                                                                          --
  20 --                                                                          --
  21 --                                                                          --
  22 -- You should have received a copy of the GNU General Public License and    --
  23 -- a copy of the GCC Runtime Library Exception along with this program;     --
  24 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  25 -- <http://www.gnu.org/licenses/>.                                          --
  26 --                                                                          --
  27 -- GNAT was originally developed  by the GNAT team at  New York University. --
  28 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
  29 --                                                                          --
  30 ------------------------------------------------------------------------------
  31 
  32 --  This package provides facilities for modifying the secondary stack pointer.
  33 
  34 with System; use System;
  35 with System.Secondary_Stack;
  36 with System.Tasking;
  37 
  38 package GNAT.Secondary_Stack is
  39    function Get_Sec_Stack return Address
  40      renames System.Tasking.Get_Sec_Stack;
  41    --  Return the address of the task specific secondary stack, as expected by
  42    --  System.Secondary_Stack.
  43 
  44    procedure Set_Sec_Stack (Stk : Address)
  45      renames System.Tasking.Set_Sec_Stack;
  46    --  Set the secondary stack pointer for the current task
  47 
  48    procedure SS_Init (Stack : System.Address; Size : Natural)
  49      renames System.Secondary_Stack.SS_Init;
  50    --  Initialize secondary stack Stack. Must be called once before using it.
  51    --  The value Size is the size of the stack in bytes. The minimal size
  52    --  is 16 bytes, and the stack must be aligned at least on
  53    --  Standard'Maximum_Alignment.
  54 end GNAT.Secondary_Stack;