Exception_Interrupts : constant Interrupt_List :=
(SIGFPE, SIGILL, SIGSEGV, SIGBUS);
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Exception_Interrupts : constant Interrupt_List :=
(SIGFPE, SIGILL, SIGSEGV, SIGBUS);
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Exception_Interrupts : constant Interrupt_List :=
(SIGFPE, SIGILL, SIGSEGV, SIGBUS);
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Exception_Interrupts : constant Interrupt_List :=
(SIGFPE, SIGILL, SIGSEGV, SIGBUS);
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Exception_Interrupts : constant Interrupt_List :=
(SIGFPE, SIGILL, SIGSEGV, SIGBUS);
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
use Interfaces.C;
use System.OS_Interface;
- Unreserve_All_Interrupts : Interfaces.C.int;
+ Unreserve_All_Interrupts : constant Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
-- Local Data --
----------------
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
-------------------------
Unblocked_Signal_Mask : aliased sigset_t;
-- The set of signals that should unblocked in all tasks
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
-- Note: the reason that Locking_Policy is not needed is that this
Next_Serial_Number : Task_Serial_Number := 100;
-- We start at 100 (reserve some special values for using in error checks)
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
Foreign_Task_Elaborated : aliased Boolean := True;
-- a time; it is used to execute in mutual exclusion from all other tasks.
-- Used to protect All_Tasks_List
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
function Get_Policy (Prio : System.Any_Priority) return Character;
Environment_Task_Id : Task_Id;
-- A variable to hold Task_Id for the environment task
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
-- Value of the pragma Locking_Policy:
-- 'C' for Ceiling_Locking
-- We start at 100, to reserve some special values for
-- using in error checking.
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
Foreign_Task_Elaborated : aliased Boolean := True;
Environment_Task_Id : Task_Id;
-- A variable to hold Task_Id for the environment task
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
-- Value of the pragma Locking_Policy:
-- 'C' for Ceiling_Locking
-- We start at 100, to reserve some special values for
-- using in error checking.
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
Foreign_Task_Elaborated : aliased Boolean := True;
-- External Configuration Values --
-----------------------------------
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
Foreign_Task_Elaborated : aliased Boolean := True;
-- The followings are internal configuration constants needed
- Dispatching_Policy : Character;
+ Dispatching_Policy : constant Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
Foreign_Task_Elaborated : aliased Boolean := True;
-- Used to identified fake tasks (i.e., non-Ada Threads)
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
Mutex_Protocol : Priority_Type;
-- time; it is used to execute in mutual exclusion from all other tasks.
-- Used to protect All_Tasks_List
- Time_Slice_Val : Integer;
+ Time_Slice_Val : constant Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
Null_Thread_Id : constant Thread_Id := 0;
Main_Task_Image : constant String := "main_task";
-- Image of environment task
- Main_Priority : Integer;
+ Main_Priority : constant Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
-- Priority for main task. Note that this is of type Integer, not Priority,
-- because we use the value -1 to indicate the default main priority, and
-- that is of course not in Priority'range.
- Main_CPU : Integer;
+ Main_CPU : constant Integer;
pragma Import (C, Main_CPU, "__gl_main_cpu");
-- Affinity for main task. Note that this is of type Integer, not
-- CPU_Range, because we use the value -1 to indicate the unassigned
-- Entry Queues implemented as doubly linked list
- Queuing_Policy : Character;
+ Queuing_Policy : constant Character;
pragma Import (C, Queuing_Policy, "__gl_queuing_policy");
Priority_Queuing : constant Boolean := Queuing_Policy = 'P';
-- Local Data --
----------------
- Locking_Policy : Character;
+ Locking_Policy : constant Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
--------------
-- Leap seconds control --
--------------------------
- Flag : Integer;
+ Flag : constant Integer;
pragma Import (C, Flag, "__gl_leap_seconds_support");
-- This imported value is used to determine whether the compilation had
-- binder flag "-y" present which enables leap seconds. A value of zero
separate (Ada.Exceptions)
procedure Call_Chain (Excep : EOA) is
- Exception_Tracebacks : Integer;
+ Exception_Tracebacks : constant Integer;
pragma Import (C, Exception_Tracebacks, "__gl_exception_tracebacks");
-- Boolean indicating whether tracebacks should be stored in exception
-- occurrences.
-- Wide_Exception_Name --
-------------------------
- WC_Encoding : Character;
+ WC_Encoding : constant Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
-- Encoding method for source, as exported by binder
-- Wide_Expanded_Name --
------------------------
- WC_Encoding : Character;
+ WC_Encoding : constant Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
-- Encoding method for source, as exported by binder
use type System.CRTL.size_t;
- WC_Encoding : Character;
+ WC_Encoding : constant Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
-- Default wide character encoding
use type System.CRTL.size_t;
- WC_Encoding : Character;
+ WC_Encoding : constant Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
-- Default wide character encoding
use type System.CRTL.size_t;
- WC_Encoding : Character;
+ WC_Encoding : constant Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
-- Default wide character encoding
function Get (Key : String) return String is
use type System.Address;
- Bind_Env_Addr : System.Address;
+ Bind_Env_Addr : constant System.Address;
pragma Import (C, Bind_Env_Addr, "__gl_bind_env_addr");
-- Variable provided by init.c/s-init.ads, and initialized by
-- the binder generated file.
------------------------
function Default_Stack_Size return Size_Type is
- Default_Stack_Size : Integer;
+ Default_Stack_Size : constant Integer;
pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
begin
if Default_Stack_Size = -1 then
------------------------
function Default_Stack_Size return Size_Type is
- Default_Stack_Size : Integer;
+ Default_Stack_Size : constant Integer;
pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
begin
if Default_Stack_Size = -1 then
package body System.Stream_Attributes is
- XDR_Flag : Integer;
- pragma Import (C, XDR_Flag, "__gl_xdr_stream");
+ XDR_Stream : constant Integer;
+ pragma Import (C, XDR_Stream, "__gl_xdr_stream");
-- This imported value is used to determine whether the build had the
-- binder switch "-xdr" present which enables XDR streaming and sets this
-- flag to 1.
- function XDR_Support return Boolean;
+ function XDR_Support return Boolean is (XDR_Stream = 1);
pragma Inline (XDR_Support);
-- Return True if XDR streaming should be used. Note that 128-bit integers
-- are not supported by the XDR protocol and will raise Device_Error.
function To_WWC is new UC (S_WWC, Wide_Wide_Character);
-----------------
- -- XDR_Support --
- -----------------
-
- function XDR_Support return Boolean is
- begin
- return XDR_Flag = 1;
- end XDR_Support;
-
- -----------------
-- Block_IO_OK --
-----------------
return Symbolic_Traceback (E, Suppress_Hex => True);
end Symbolic_Traceback_No_Hex;
- Exception_Tracebacks_Symbolic : Integer;
+ Exception_Tracebacks_Symbolic : constant Integer;
pragma Import
(C,
Exception_Tracebacks_Symbolic,