Remove some compile time warnings about duplicate definitions.
[official-gcc.git] / gcc / ada / s-parame.ads
blob92028c173980d620aee7737b6dcc29e9395f1b0a
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.41 $
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 ------------------------------------------------------------------------------
36 -- This is the default version used for all systems for which no special
37 -- target-specific version of this package is provided.
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.
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.
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.
51 -- Note: do not introduce any pragma Inline statements into this unit, since
52 -- otherwise the relinking and rebinding capability would be deactivated.
54 package System.Parameters is
55 pragma Pure (Parameters);
57 ---------------------------------------
58 -- Task And Stack Allocation Control --
59 ---------------------------------------
61 type Task_Storage_Size is new Integer;
62 -- Type used in tasking units for task storage size
64 type Size_Type is new Task_Storage_Size;
65 -- Type used to provide task storage size to runtime
67 Unspecified_Size : constant Size_Type := Size_Type'First;
68 -- Value used to indicate that no size type is set
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.
78 Sec_Stack_Ratio : constant Ratio := Dynamic;
79 -- This constant defines the handling of the secondary stack
81 Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
82 -- Convenient Boolean for testing for dynamic secondary stack
84 function Default_Stack_Size return Size_Type;
85 -- Default task stack size used if none is specified
87 function Minimum_Stack_Size return Size_Type;
88 -- Minimum task stack size permitted
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:
95 -- when Size = Unspecified_Size, return Default_Stack_Size
96 -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size
97 -- otherwise return given Size
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.
104 ----------------------------------------------
105 -- Characteristics of types in Interfaces.C --
106 ----------------------------------------------
108 long_bits : constant := Long_Integer'Size;
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.
113 ----------------------------------------------
114 -- Behavior of Pragma Finalize_Storage_Only --
115 ----------------------------------------------
117 -- Garbage_Collected is a Boolean constant whose value indicates the
118 -- effect of the pragma Finalize_Storage_Entry on a controlled type.
120 -- Garbage_Collected = False
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.
127 -- Garbage_Collected = True
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.
133 Garbage_Collected : constant Boolean := False;
134 -- The storage mode for this system (release on program exit)
136 end System.Parameters;