annotate gcc/ada/libgnat/s-parame__hpux.ads @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S Y S T E M . P A R A M E T E R S --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
17 -- --
kono
parents:
diff changeset
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
19 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
20 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- You should have received a copy of the GNU General Public License and --
kono
parents:
diff changeset
23 -- a copy of the GCC Runtime Library Exception along with this program; --
kono
parents:
diff changeset
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
kono
parents:
diff changeset
25 -- <http://www.gnu.org/licenses/>. --
kono
parents:
diff changeset
26 -- --
kono
parents:
diff changeset
27 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
29 -- --
kono
parents:
diff changeset
30 ------------------------------------------------------------------------------
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 -- This is the HP version of this package
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 -- This package defines some system dependent parameters for GNAT. These
kono
parents:
diff changeset
35 -- are values that are referenced by the runtime library and are therefore
kono
parents:
diff changeset
36 -- relevant to the target machine.
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 -- The parameters whose value is defined in the spec are not generally
kono
parents:
diff changeset
39 -- expected to be changed. If they are changed, it will be necessary to
kono
parents:
diff changeset
40 -- recompile the run-time library.
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 -- The parameters which are defined by functions can be changed by modifying
kono
parents:
diff changeset
43 -- the body of System.Parameters in file s-parame.adb. A change to this body
kono
parents:
diff changeset
44 -- requires only rebinding and relinking of the application.
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 -- Note: do not introduce any pragma Inline statements into this unit, since
kono
parents:
diff changeset
47 -- otherwise the relinking and rebinding capability would be deactivated.
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 package System.Parameters is
kono
parents:
diff changeset
50 pragma Pure;
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 ---------------------------------------
kono
parents:
diff changeset
53 -- Task And Stack Allocation Control --
kono
parents:
diff changeset
54 ---------------------------------------
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 type Task_Storage_Size is new Integer;
kono
parents:
diff changeset
57 -- Type used in tasking units for task storage size
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 type Size_Type is new Task_Storage_Size;
kono
parents:
diff changeset
60 -- Type used to provide task storage size to runtime
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 Unspecified_Size : constant Size_Type := Size_Type'First;
kono
parents:
diff changeset
63 -- Value used to indicate that no size type is set
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 function Default_Stack_Size return Size_Type;
kono
parents:
diff changeset
66 -- Default task stack size used if none is specified
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 function Minimum_Stack_Size return Size_Type;
kono
parents:
diff changeset
69 -- Minimum task stack size permitted
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
kono
parents:
diff changeset
72 -- Given the storage size stored in the TCB, return the Storage_Size
kono
parents:
diff changeset
73 -- value required by the RM for the Storage_Size attribute. The
kono
parents:
diff changeset
74 -- required adjustment is as follows:
kono
parents:
diff changeset
75 --
kono
parents:
diff changeset
76 -- when Size = Unspecified_Size, return Default_Stack_Size
kono
parents:
diff changeset
77 -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size
kono
parents:
diff changeset
78 -- otherwise return given Size
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 Default_Env_Stack_Size : constant Size_Type := 8_192_000;
kono
parents:
diff changeset
81 -- Assumed size of the environment task, if no other information
kono
parents:
diff changeset
82 -- is available. This value is used when stack checking is
kono
parents:
diff changeset
83 -- enabled and no GNAT_STACK_LIMIT environment variable is set.
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 Stack_Grows_Down : constant Boolean := False;
kono
parents:
diff changeset
86 -- This constant indicates whether the stack grows up (False) or
kono
parents:
diff changeset
87 -- down (True) in memory as functions are called. It is used for
kono
parents:
diff changeset
88 -- proper implementation of the stack overflow check.
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 Runtime_Default_Sec_Stack_Size : constant Size_Type := 10 * 1024;
kono
parents:
diff changeset
91 -- The run-time chosen default size for secondary stacks that may be
kono
parents:
diff changeset
92 -- overriden by the user with the use of binder -D switch.
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 function Default_Sec_Stack_Size return Size_Type;
kono
parents:
diff changeset
95 -- The default initial size for secondary stacks that reflects any user
kono
parents:
diff changeset
96 -- specified default via the binder -D switch.
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 Sec_Stack_Dynamic : constant Boolean := True;
kono
parents:
diff changeset
99 -- Indicates if secondary stacks can grow and shrink at run-time. If False,
kono
parents:
diff changeset
100 -- the size of a secondary stack is fixed at the point of its creation.
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 ----------------------------------------------
kono
parents:
diff changeset
103 -- Characteristics of Types in Interfaces.C --
kono
parents:
diff changeset
104 ----------------------------------------------
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 long_bits : constant := Long_Integer'Size;
kono
parents:
diff changeset
107 -- Number of bits in type long and unsigned_long. The normal convention
kono
parents:
diff changeset
108 -- is that this is the same as type Long_Integer, but this may not be true
kono
parents:
diff changeset
109 -- of all targets.
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 ptr_bits : constant := Standard'Address_Size;
kono
parents:
diff changeset
112 subtype C_Address is System.Address;
kono
parents:
diff changeset
113 -- Number of bits in Interfaces.C pointers, normally a standard address
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 C_Malloc_Linkname : constant String := "__gnat_malloc";
kono
parents:
diff changeset
116 -- Name of runtime function used to allocate such a pointer
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 ----------------------------------------------
kono
parents:
diff changeset
119 -- Behavior of Pragma Finalize_Storage_Only --
kono
parents:
diff changeset
120 ----------------------------------------------
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 -- Garbage_Collected is a Boolean constant whose value indicates the
kono
parents:
diff changeset
123 -- effect of the pragma Finalize_Storage_Entry on a controlled type.
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 -- Garbage_Collected = False
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 -- The system releases all storage on program termination only,
kono
parents:
diff changeset
128 -- but not other garbage collection occurs, so finalization calls
kono
parents:
diff changeset
129 -- are omitted only for outer level objects can be omitted if
kono
parents:
diff changeset
130 -- pragma Finalize_Storage_Only is used.
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 -- Garbage_Collected = True
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 -- The system provides full garbage collection, so it is never
kono
parents:
diff changeset
135 -- necessary to release storage for controlled objects for which
kono
parents:
diff changeset
136 -- a pragma Finalize_Storage_Only is used.
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 Garbage_Collected : constant Boolean := False;
kono
parents:
diff changeset
139 -- The storage mode for this system (release on program exit)
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 ---------------------
kono
parents:
diff changeset
142 -- Tasking Profile --
kono
parents:
diff changeset
143 ---------------------
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 -- In the following sections, constant parameters are defined to
kono
parents:
diff changeset
146 -- allow some optimizations and fine tuning within the tasking run time
kono
parents:
diff changeset
147 -- based on restrictions on the tasking features.
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 ----------------------
kono
parents:
diff changeset
150 -- Locking Strategy --
kono
parents:
diff changeset
151 ----------------------
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 Single_Lock : constant Boolean := False;
kono
parents:
diff changeset
154 -- Indicates whether a single lock should be used within the tasking
kono
parents:
diff changeset
155 -- run-time to protect internal structures. If True, a single lock
kono
parents:
diff changeset
156 -- will be used, meaning less locking/unlocking operations, but also
kono
parents:
diff changeset
157 -- more global contention. In general, Single_Lock should be set to
kono
parents:
diff changeset
158 -- True on single processor machines, and to False to multi-processor
kono
parents:
diff changeset
159 -- systems, but this can vary from application to application and also
kono
parents:
diff changeset
160 -- depends on the scheduling policy.
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 -------------------
kono
parents:
diff changeset
163 -- Task Abortion --
kono
parents:
diff changeset
164 -------------------
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166 No_Abort : constant Boolean := False;
kono
parents:
diff changeset
167 -- This constant indicates whether abort statements and asynchronous
kono
parents:
diff changeset
168 -- transfer of control (ATC) are disallowed. If set to True, it is
kono
parents:
diff changeset
169 -- assumed that neither construct is used, and the run time does not
kono
parents:
diff changeset
170 -- need to defer/undefer abort and check for pending actions at
kono
parents:
diff changeset
171 -- completion points. A value of True for No_Abort corresponds to:
kono
parents:
diff changeset
172 -- pragma Restrictions (No_Abort_Statements);
kono
parents:
diff changeset
173 -- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 ---------------------
kono
parents:
diff changeset
176 -- Task Attributes --
kono
parents:
diff changeset
177 ---------------------
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 Max_Attribute_Count : constant := 32;
kono
parents:
diff changeset
180 -- Number of task attributes stored in the task control block
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 -----------------------
kono
parents:
diff changeset
183 -- Task Image Length --
kono
parents:
diff changeset
184 -----------------------
kono
parents:
diff changeset
185
kono
parents:
diff changeset
186 Max_Task_Image_Length : constant := 256;
kono
parents:
diff changeset
187 -- This constant specifies the maximum length of a task's image
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 ------------------------------
kono
parents:
diff changeset
190 -- Exception Message Length --
kono
parents:
diff changeset
191 ------------------------------
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 Default_Exception_Msg_Max_Length : constant := 200;
kono
parents:
diff changeset
194 -- This constant specifies the default number of characters to allow
kono
parents:
diff changeset
195 -- in an exception message (200 is minimum required by RM 11.4.1(18)).
kono
parents:
diff changeset
196
kono
parents:
diff changeset
197 end System.Parameters;