Debian Codegraph @

gcc/ada/libgnat/s-parame__vxworks.ads

raw
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 -- Copyright (C) 1992-2025, Free Software Foundation, Inc. --
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 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
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 is the default VxWorks version of the package
33
34 -- This package defines some system dependent parameters for GNAT. These
35 -- are values that are referenced by the runtime library and are therefore
36 -- relevant to the target machine.
37
38 -- The parameters whose value is defined in the spec are not generally
39 -- expected to be changed. If they are changed, it will be necessary to
40 -- recompile the run-time library.
41
42 -- The parameters which are defined by functions can be changed by modifying
43 -- the body of System.Parameters in file s-parame.adb. A change to this body
44 -- requires only rebinding and relinking of the application.
45
46 -- Note: do not introduce any pragma Inline statements into this unit, since
47 -- otherwise the relinking and rebinding capability would be deactivated.
48
49 package System.Parameters is
50 pragma Pure;
51
52 ---------------------------------------
53 -- Task And Stack Allocation Control --
54 ---------------------------------------
55
56 type Size_Type is range -Memory_Size / 2 .. Memory_Size / 2 - 1;
57 -- Type used to provide task stack sizes to the runtime. Sized to permit
58 -- stack sizes of up to half the total addressable memory space. This may
59 -- seem excessively large (even for 32-bit systems), however there are many
60 -- instances of users requiring large stack sizes (for example string
61 -- processing).
62
63 Unspecified_Size : constant Size_Type := Size_Type'First;
64 -- Value used to indicate that no size type is set
65
66 function Default_Stack_Size return Size_Type;
67 -- Default task stack size used if none is specified
68
69 function Minimum_Stack_Size return Size_Type;
70 -- Minimum task stack size permitted
71
72 function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
73 -- Given the storage size stored in the TCB, return the Storage_Size
74 -- value required by the RM for the Storage_Size attribute. The
75 -- required adjustment is as follows:
76 --
77 -- when Size = Unspecified_Size, return Default_Stack_Size
78 -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size
79 -- otherwise return given Size
80
81 Default_Env_Stack_Size : constant Size_Type := 14_336;
82 -- Assumed size of the environment task, if no other information
83 -- is available. This value is used when stack checking is
84 -- enabled and no GNAT_STACK_LIMIT environment variable is set.
85 -- This value is chosen as the VxWorks default stack size is 20kB,
86 -- and a little more than 4kB is necessary for the run time.
87
88 Stack_Grows_Down : constant Boolean := True;
89 -- This constant indicates whether the stack grows up (False) or
90 -- down (True) in memory as functions are called. It is used for
91 -- proper implementation of the stack overflow check.
92
93 Runtime_Default_Sec_Stack_Size : constant Size_Type := 10 * 1024;
94 -- The run-time chosen default size for secondary stacks that may be
95 -- overriden by the user with the use of binder -D switch.
96
97 Sec_Stack_Dynamic : constant Boolean := True;
98 -- Indicates if secondary stacks can grow and shrink at run-time. If False,
99 -- the size of a secondary stack is fixed at the point of its creation.
100
101 ------------------------------------
102 -- Characteristics of time_t type --
103 ------------------------------------
104
105 -- IMPORTANT NOTE:
106 -- Select the appropriate time_t_bits for the VSB in use, then rebuild
107 -- the runtime using instructions in adainclude/libada.gpr.
108
109 -- time_t_bits : constant := Long_Integer'Size;
110 -- Number of bits in type time_t for SR0650 and before and SR0660 with
111 -- non-default configuration.
112
113 time_t_bits : constant := Long_Long_Integer'Size;
114 -- Number of bits in type time_t for SR0660 with default configuration.
115
116 ----------------------------------------------
117 -- Characteristics of types in Interfaces.C --
118 ----------------------------------------------
119
120 long_bits : constant := Long_Integer'Size;
121 -- Number of bits in type long and unsigned_long. The normal convention
122 -- is that this is the same as type Long_Integer, but this may not be true
123 -- of all targets.
124
125 ptr_bits : constant := Standard'Address_Size;
126 subtype C_Address is System.Address;
127 -- Number of bits in Interfaces.C pointers, normally a standard address
128
129 C_Malloc_Linkname : constant String := "__gnat_malloc";
130 -- Name of runtime function used to allocate such a pointer
131
132 ----------------------------------------------
133 -- Behavior of Pragma Finalize_Storage_Only --
134 ----------------------------------------------
135
136 -- Garbage_Collected is a Boolean constant whose value indicates the
137 -- effect of the pragma Finalize_Storage_Entry on a controlled type.
138
139 -- Garbage_Collected = False
140
141 -- The system releases all storage on program termination only,
142 -- but not other garbage collection occurs, so finalization calls
143 -- are omitted only for outer level objects can be omitted if
144 -- pragma Finalize_Storage_Only is used.
145
146 -- Garbage_Collected = True
147
148 -- The system provides full garbage collection, so it is never
149 -- necessary to release storage for controlled objects for which
150 -- a pragma Finalize_Storage_Only is used.
151
152 Garbage_Collected : constant Boolean := False;
153 -- The storage mode for this system (release on program exit)
154
155 ---------------------
156 -- Tasking Profile --
157 ---------------------
158
159 -- In the following sections, constant parameters are defined to
160 -- allow some optimizations and fine tuning within the tasking run time
161 -- based on restrictions on the tasking features.
162
163 -------------------
164 -- Task Abortion --
165 -------------------
166
167 No_Abort : constant Boolean := False;
168 -- This constant indicates whether abort statements and asynchronous
169 -- transfer of control (ATC) are disallowed. If set to True, it is
170 -- assumed that neither construct is used, and the run time does not
171 -- need to defer/undefer abort and check for pending actions at
172 -- completion points. A value of True for No_Abort corresponds to:
173 -- pragma Restrictions (No_Abort_Statements);
174 -- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
175
176 ---------------------
177 -- Task Attributes --
178 ---------------------
179
180 Max_Attribute_Count : constant := 16;
181 -- Number of task attributes stored in the task control block
182
183 -----------------------
184 -- Task Image Length --
185 -----------------------
186
187 Max_Task_Image_Length : constant := 32;
188 -- This constant specifies the maximum length of a task's image
189
190 ------------------------------
191 -- Exception Message Length --
192 ------------------------------
193
194 Default_Exception_Msg_Max_Length : constant := 200;
195 -- This constant specifies the default number of characters to allow
196 -- in an exception message (200 is minimum required by RM 11.4.1(18)).
197
198 end System.Parameters;