raw
zfp_genesis             1 ------------------------------------------------------------------------------
zfp_genesis 2 ------------------------------------------------------------------------------
zfp_genesis 3 -- You do not have, nor can you ever acquire the right to use, copy or --
zfp_genesis 4 -- distribute this software ; Should you use this software for any purpose, --
zfp_genesis 5 -- or copy and distribute it to anyone or in any manner, you are breaking --
zfp_genesis 6 -- the laws of whatever soi-disant jurisdiction, and you promise to --
zfp_genesis 7 -- continue doing so for the indefinite future. In any case, please --
zfp_genesis 8 -- always : read and understand any software ; verify any PGP signatures --
zfp_genesis 9 -- that you use - for any purpose. --
zfp_genesis 10 -- --
zfp_genesis 11 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
zfp_genesis 12 ------------------------------------------------------------------------------
zfp_genesis 13 ------------------------------------------------------------------------------
zfp_genesis 14
zfp_genesis 15 -- Default version used when no target-specific version is provided
zfp_genesis 16
zfp_genesis 17 -- This package defines some system dependent parameters for GNAT. These
zfp_genesis 18 -- are values that are referenced by the runtime library and are therefore
zfp_genesis 19 -- relevant to the target machine.
zfp_genesis 20
zfp_genesis 21 -- The parameters whose value is defined in the spec are not generally
zfp_genesis 22 -- expected to be changed. If they are changed, it will be necessary to
zfp_genesis 23 -- recompile the run-time library.
zfp_genesis 24
zfp_genesis 25 -- The parameters which are defined by functions can be changed by modifying
zfp_genesis 26 -- the body of System.Parameters in file s-parame.adb. A change to this body
zfp_genesis 27 -- requires only rebinding and relinking of the application.
zfp_genesis 28
zfp_genesis 29 -- Note: do not introduce any pragma Inline statements into this unit, since
zfp_genesis 30 -- otherwise the relinking and rebinding capability would be deactivated.
zfp_genesis 31
zfp_genesis 32 pragma Compiler_Unit_Warning;
zfp_genesis 33
zfp_genesis 34 package System.Parameters is
zfp_genesis 35 pragma Pure;
zfp_genesis 36
zfp_genesis 37 ---------------------------------------
zfp_genesis 38 -- Task And Stack Allocation Control --
zfp_genesis 39 ---------------------------------------
zfp_genesis 40
zfp_genesis 41 type Task_Storage_Size is new Integer;
zfp_genesis 42 -- Type used in tasking units for task storage size
zfp_genesis 43
zfp_genesis 44 type Size_Type is new Task_Storage_Size;
zfp_genesis 45 -- Type used to provide task storage size to runtime
zfp_genesis 46
zfp_genesis 47 Unspecified_Size : constant Size_Type := Size_Type'First;
zfp_genesis 48 -- Value used to indicate that no size type is set
zfp_genesis 49
zfp_genesis 50 subtype Percentage is Size_Type range -1 .. 100;
zfp_genesis 51 Dynamic : constant Size_Type := -1;
zfp_genesis 52 -- The secondary stack ratio is a constant between 0 and 100 which
zfp_genesis 53 -- determines the percentage of the allocated task stack that is
zfp_genesis 54 -- used by the secondary stack (the rest being the primary stack).
zfp_genesis 55 -- The special value of minus one indicates that the secondary
zfp_genesis 56 -- stack is to be allocated from the heap instead.
zfp_genesis 57
zfp_genesis 58 Sec_Stack_Percentage : constant Percentage := Dynamic;
zfp_genesis 59 -- This constant defines the handling of the secondary stack
zfp_genesis 60
zfp_genesis 61 Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
zfp_genesis 62 -- Convenient Boolean for testing for dynamic secondary stack
zfp_genesis 63
zfp_genesis 64 function Default_Stack_Size return Size_Type;
zfp_genesis 65 -- Default task stack size used if none is specified
zfp_genesis 66
zfp_genesis 67 function Minimum_Stack_Size return Size_Type;
zfp_genesis 68 -- Minimum task stack size permitted
zfp_genesis 69
zfp_genesis 70 function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
zfp_genesis 71 -- Given the storage size stored in the TCB, return the Storage_Size
zfp_genesis 72 -- value required by the RM for the Storage_Size attribute. The
zfp_genesis 73 -- required adjustment is as follows:
zfp_genesis 74 --
zfp_genesis 75 -- when Size = Unspecified_Size, return Default_Stack_Size
zfp_genesis 76 -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size
zfp_genesis 77 -- otherwise return given Size
zfp_genesis 78
zfp_genesis 79 Default_Env_Stack_Size : constant Size_Type := 8_192_000;
zfp_genesis 80 -- Assumed size of the environment task, if no other information
zfp_genesis 81 -- is available. This value is used when stack checking is
zfp_genesis 82 -- enabled and no GNAT_STACK_LIMIT environment variable is set.
zfp_genesis 83
zfp_genesis 84 Stack_Grows_Down : constant Boolean := True;
zfp_genesis 85 -- This constant indicates whether the stack grows up (False) or
zfp_genesis 86 -- down (True) in memory as functions are called. It is used for
zfp_genesis 87 -- proper implementation of the stack overflow check.
zfp_genesis 88
zfp_genesis 89 ----------------------------------------------
zfp_genesis 90 -- Characteristics of types in Interfaces.C --
zfp_genesis 91 ----------------------------------------------
zfp_genesis 92
zfp_genesis 93 long_bits : constant := Long_Integer'Size;
zfp_genesis 94 -- Number of bits in type long and unsigned_long. The normal convention
zfp_genesis 95 -- is that this is the same as type Long_Integer, but this may not be true
zfp_genesis 96 -- of all targets.
zfp_genesis 97
zfp_genesis 98 ptr_bits : constant := Standard'Address_Size;
zfp_genesis 99 subtype C_Address is System.Address;
zfp_genesis 100 -- Number of bits in Interfaces.C pointers, normally a standard address
zfp_genesis 101
zfp_genesis 102 C_Malloc_Linkname : constant String := "__gnat_malloc";
zfp_genesis 103 -- Name of runtime function used to allocate such a pointer
zfp_genesis 104
zfp_genesis 105 ----------------------------------------------
zfp_genesis 106 -- Behavior of Pragma Finalize_Storage_Only --
zfp_genesis 107 ----------------------------------------------
zfp_genesis 108
zfp_genesis 109 -- Garbage_Collected is a Boolean constant whose value indicates the
zfp_genesis 110 -- effect of the pragma Finalize_Storage_Entry on a controlled type.
zfp_genesis 111
zfp_genesis 112 -- Garbage_Collected = False
zfp_genesis 113
zfp_genesis 114 -- The system releases all storage on program termination only,
zfp_genesis 115 -- but not other garbage collection occurs, so finalization calls
zfp_genesis 116 -- are omitted only for outer level objects can be omitted if
zfp_genesis 117 -- pragma Finalize_Storage_Only is used.
zfp_genesis 118
zfp_genesis 119 -- Garbage_Collected = True
zfp_genesis 120
zfp_genesis 121 -- The system provides full garbage collection, so it is never
zfp_genesis 122 -- necessary to release storage for controlled objects for which
zfp_genesis 123 -- a pragma Finalize_Storage_Only is used.
zfp_genesis 124
zfp_genesis 125 Garbage_Collected : constant Boolean := False;
zfp_genesis 126 -- The storage mode for this system (release on program exit)
zfp_genesis 127
zfp_genesis 128 ---------------------
zfp_genesis 129 -- Tasking Profile --
zfp_genesis 130 ---------------------
zfp_genesis 131
zfp_genesis 132 -- In the following sections, constant parameters are defined to
zfp_genesis 133 -- allow some optimizations and fine tuning within the tasking run time
zfp_genesis 134 -- based on restrictions on the tasking features.
zfp_genesis 135
zfp_genesis 136 ----------------------
zfp_genesis 137 -- Locking Strategy --
zfp_genesis 138 ----------------------
zfp_genesis 139
zfp_genesis 140 Single_Lock : constant Boolean := False;
zfp_genesis 141 -- Indicates whether a single lock should be used within the tasking
zfp_genesis 142 -- run-time to protect internal structures. If True, a single lock
zfp_genesis 143 -- will be used, meaning less locking/unlocking operations, but also
zfp_genesis 144 -- more global contention. In general, Single_Lock should be set to
zfp_genesis 145 -- True on single processor machines, and to False to multi-processor
zfp_genesis 146 -- systems, but this can vary from application to application and also
zfp_genesis 147 -- depends on the scheduling policy.
zfp_genesis 148
zfp_genesis 149 -------------------
zfp_genesis 150 -- Task Abortion --
zfp_genesis 151 -------------------
zfp_genesis 152
zfp_genesis 153 No_Abort : constant Boolean := False;
zfp_genesis 154 -- This constant indicates whether abort statements and asynchronous
zfp_genesis 155 -- transfer of control (ATC) are disallowed. If set to True, it is
zfp_genesis 156 -- assumed that neither construct is used, and the run time does not
zfp_genesis 157 -- need to defer/undefer abort and check for pending actions at
zfp_genesis 158 -- completion points. A value of True for No_Abort corresponds to:
zfp_genesis 159 -- pragma Restrictions (No_Abort_Statements);
zfp_genesis 160 -- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
zfp_genesis 161
zfp_genesis 162 ---------------------
zfp_genesis 163 -- Task Attributes --
zfp_genesis 164 ---------------------
zfp_genesis 165
zfp_genesis 166 Max_Attribute_Count : constant := 32;
zfp_genesis 167 -- Number of task attributes stored in the task control block
zfp_genesis 168
zfp_genesis 169 --------------------
zfp_genesis 170 -- Runtime Traces --
zfp_genesis 171 --------------------
zfp_genesis 172
zfp_genesis 173 Runtime_Traces : constant Boolean := False;
zfp_genesis 174 -- This constant indicates whether the runtime outputs traces to a
zfp_genesis 175 -- predefined output or not (True means that traces are output).
zfp_genesis 176 -- See System.Traces for more details.
zfp_genesis 177
zfp_genesis 178 -----------------------
zfp_genesis 179 -- Task Image Length --
zfp_genesis 180 -----------------------
zfp_genesis 181
zfp_genesis 182 Max_Task_Image_Length : constant := 256;
zfp_genesis 183 -- This constant specifies the maximum length of a task's image
zfp_genesis 184
zfp_genesis 185 ------------------------------
zfp_genesis 186 -- Exception Message Length --
zfp_genesis 187 ------------------------------
zfp_genesis 188
zfp_genesis 189 Default_Exception_Msg_Max_Length : constant := 200;
zfp_genesis 190 -- This constant specifies the default number of characters to allow
zfp_genesis 191 -- in an exception message (200 is minimum required by RM 11.4.1(18)).
zfp_genesis 192
zfp_genesis 193 end System.Parameters;