OSDN Git Service

* doc/install.texi (xtensa-*-elf): New target.
[pf3gnuchains/gcc-fork.git] / gcc / ada / 5zparame.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                    S Y S T E M . P A R A M E T E R S                     --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision: 1.13 $
10 --                                                                          --
11 --          Copyright (C) 1992-2000 Free Software Foundation, Inc.          --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- As a special exception,  if other files  instantiate  generics from this --
25 -- unit, or you link  this unit with other files  to produce an executable, --
26 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
27 -- covered  by the  GNU  General  Public  License.  This exception does not --
28 -- however invalidate  any other reasons why  the executable file  might be --
29 -- covered by the  GNU Public License.                                      --
30 --                                                                          --
31 -- GNAT was originally developed  by the GNAT team at  New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 --                                                                          --
34 ------------------------------------------------------------------------------
35
36 --  This is the VxWorks/68k version of this package
37
38 --  This package defines some system dependent parameters for GNAT. These
39 --  are values that are referenced by the runtime library and are therefore
40 --  relevant to the target machine.
41
42 --  The parameters whose value is defined in the spec are not generally
43 --  expected to be changed. If they are changed, it will be necessary to
44 --  recompile the run-time library.
45
46 --  The parameters which are defined by functions can be changed by modifying
47 --  the body of System.Parameters in file s-parame.adb. A change to this body
48 --  requires only rebinding and relinking of the application.
49
50 --  Note: do not introduce any pragma Inline statements into this unit, since
51 --  otherwise the relinking and rebinding capability would be deactivated.
52
53 package System.Parameters is
54 pragma Pure (Parameters);
55
56    ---------------------------------------
57    -- Task And Stack Allocation Control --
58    ---------------------------------------
59
60    type Task_Storage_Size is new Integer;
61    --  Type used in tasking units for task storage size
62
63    type Size_Type is new Task_Storage_Size;
64    --  Type used to provide task storage size to runtime
65
66    Unspecified_Size : constant Size_Type := Size_Type'First;
67    --  Value used to indicate that no size type is set
68
69    subtype Ratio is Size_Type range -1 .. 100;
70    Dynamic : constant Size_Type := -1;
71    --  Secondary_Stack_Ratio is a constant between 0 and 100 wich
72    --  determines the percentage of the allocate task stack that is
73    --  used by the secondary stack (the rest being the primary stack).
74    --  The special value of minus one indicates that the secondary
75    --  stack is to be allocated from the heap instead.
76
77    Sec_Stack_Ratio : constant Ratio := -1;
78    --  This constant defines the handling of the secondary stack
79
80    Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
81    --  Convenient Boolean for testing for dynmaic secondary stack
82
83    function Default_Stack_Size return Size_Type;
84    --  Default task stack size used if none is specified
85
86    function Minimum_Stack_Size return Size_Type;
87    --  Minimum task stack size permitted
88
89    function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
90    --  Given the storage size stored in the TCB, return the Storage_Size
91    --  value required by the RM for the Storage_Size attribute. The
92    --  required adjustment is as follows:
93    --
94    --    when Size = Unspecified_Size, return Default_Stack_Size
95    --    when Size < Minimum_Stack_Size, return Minimum_Stack_Size
96    --    otherwise return given Size
97
98    Stack_Grows_Down  : constant Boolean := True;
99    --  This constant indicates whether the stack grows up (False) or
100    --  down (True) in memory as functions are called. It is used for
101    --  proper implementation of the stack overflow check.
102
103    ----------------------------------------------
104    -- Characteristics of types in Interfaces.C --
105    ----------------------------------------------
106
107    long_bits : constant := Long_Integer'Size;
108    --  Number of bits in type long and unsigned_long. The normal convention
109    --  is that this is the same as type Long_Integer, but this is not true
110    --  of all targets. For example, in OpenVMS long /= Long_Integer.
111
112    ----------------------------------------------
113    -- Behavior of Pragma Finalize_Storage_Only --
114    ----------------------------------------------
115
116    --  Garbage_Collected is a Boolean constant whose value indicates the
117    --  effect of the pragma Finalize_Storage_Entry on a controlled type.
118
119    --    Garbage_Collected = False
120
121    --      The system releases all storage on program termination only,
122    --      but not other garbage collection occurs, so finalization calls
123    --      are ommitted only for outer level onjects can be omitted if
124    --      pragma Finalize_Storage_Only is used.
125
126    --    Garbage_Collected = True
127
128    --      The system provides full garbage collection, so it is never
129    --      necessary to release storage for controlled objects for which
130    --      a pragma Finalize_Storage_Only is used.
131
132    Garbage_Collected : constant Boolean := False;
133    --  The storage mode for this system (release on program exit)
134
135 end System.Parameters;