OSDN Git Service

* sem_ch3.adb (Find_Type_Of_Subtype_Indic): If subtype indication
[pf3gnuchains/gcc-fork.git] / gcc / ada / 5vparame.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.23 $
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 OpenVMS version.
37 --  Blank line intentional so that it lines up exactly with default.
38
39 --  This package defines some system dependent parameters for GNAT. These
40 --  are values that are referenced by the runtime library and are therefore
41 --  relevant to the target machine.
42
43 --  The parameters whose value is defined in the spec are not generally
44 --  expected to be changed. If they are changed, it will be necessary to
45 --  recompile the run-time library.
46
47 --  The parameters which are defined by functions can be changed by modifying
48 --  the body of System.Parameters in file s-parame.adb. A change to this body
49 --  requires only rebinding and relinking of the application.
50
51 --  Note: do not introduce any pragma Inline statements into this unit, since
52 --  otherwise the relinking and rebinding capability would be deactivated.
53
54 package System.Parameters is
55 pragma Pure (Parameters);
56
57    ---------------------------------------
58    -- Task And Stack Allocation Control --
59    ---------------------------------------
60
61    type Task_Storage_Size is new Integer;
62    --  Type used in tasking units for task storage size
63
64    type Size_Type is new Task_Storage_Size;
65    --  Type used to provide task storage size to runtime
66
67    Unspecified_Size : constant Size_Type := Size_Type'First;
68    --  Value used to indicate that no size type is set
69
70    subtype Ratio is Size_Type range -1 .. 100;
71    Dynamic : constant Size_Type := -1;
72    --  The secondary stack ratio is a constant between 0 and 100 which
73    --  determines the percentage of the allocated task stack that is
74    --  used by the secondary stack (the rest being the primary stack).
75    --  The special value of minus one indicates that the secondary
76    --  stack is to be allocated from the heap instead.
77
78    Sec_Stack_Ratio : constant Ratio := Dynamic;
79    --  This constant defines the handling of the secondary stack
80
81    Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
82    --  Convenient Boolean for testing for dynamic secondary stack
83
84    function Default_Stack_Size return Size_Type;
85    --  Default task stack size used if none is specified
86
87    function Minimum_Stack_Size return Size_Type;
88    --  Minimum task stack size permitted
89
90    function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
91    --  Given the storage size stored in the TCB, return the Storage_Size
92    --  value required by the RM for the Storage_Size attribute. The
93    --  required adjustment is as follows:
94    --
95    --    when Size = Unspecified_Size, return Default_Stack_Size
96    --    when Size < Minimum_Stack_Size, return Minimum_Stack_Size
97    --    otherwise return given Size
98
99    Stack_Grows_Down  : constant Boolean := True;
100    --  This constant indicates whether the stack grows up (False) or
101    --  down (True) in memory as functions are called. It is used for
102    --  proper implementation of the stack overflow check.
103
104    ----------------------------------------------
105    -- Characteristics of types in Interfaces.C --
106    ----------------------------------------------
107
108    long_bits : constant := 32;
109    --  Number of bits in type long and unsigned_long. The normal convention
110    --  is that this is the same as type Long_Integer, but this is not true
111    --  of all targets. For example, in OpenVMS long /= Long_Integer.
112
113    ----------------------------------------------
114    -- Behavior of Pragma Finalize_Storage_Only --
115    ----------------------------------------------
116
117    --  Garbage_Collected is a Boolean constant whose value indicates the
118    --  effect of the pragma Finalize_Storage_Entry on a controlled type.
119
120    --    Garbage_Collected = False
121
122    --      The system releases all storage on program termination only,
123    --      but not other garbage collection occurs, so finalization calls
124    --      are ommitted only for outer level onjects can be omitted if
125    --      pragma Finalize_Storage_Only is used.
126
127    --    Garbage_Collected = True
128
129    --      The system provides full garbage collection, so it is never
130    --      necessary to release storage for controlled objects for which
131    --      a pragma Finalize_Storage_Only is used.
132
133    Garbage_Collected : constant Boolean := False;
134    --  The storage mode for this system (release on program exit)
135
136 end System.Parameters;