-- Interrupt_Context --
-----------------------
- function Interrupt_Context return int is
+ function Interrupt_Context return BOOL is
begin
return System.VxWorks.Ext.Interrupt_Context;
end Interrupt_Context;
type unsigned_long_long is mod 2 ** long_long'Size;
type size_t is mod 2 ** Standard'Address_Size;
+ subtype BOOL is System.VxWorks.Ext.BOOL;
subtype vx_freq_t is System.VxWorks.Ext.vx_freq_t;
-----------
function taskResume (tid : t_id) return int;
pragma Import (C, taskResume, "taskResume");
- function taskIsSuspended (tid : t_id) return int;
+ function taskIsSuspended (tid : t_id) return BOOL;
pragma Import (C, taskIsSuspended, "taskIsSuspended");
function taskDelay (ticks : int) return int;
-- which is invoked after the OS has saved enough context for a high-level
-- language routine to be safely invoked.
- function Interrupt_Context return int;
+ function Interrupt_Context return BOOL;
pragma Inline (Interrupt_Context);
- -- Return 1 if executing in an interrupt context; return 0 if executing in
- -- a task context.
+ -- Return 1 (TRUE) if executing in an interrupt context;
+ -- return 0 (FALSE) if executing in a task context.
function Interrupt_Number_To_Vector (intNum : int) return Interrupt_Vector;
pragma Inline (Interrupt_Number_To_Vector);
use System.Tasking;
use System.OS_Interface;
use System.Parameters;
- use type System.VxWorks.Ext.t_id;
use type Interfaces.C.int;
use type System.OS_Interface.unsigned;
+ use type System.VxWorks.Ext.t_id;
+ use type System.VxWorks.Ext.BOOL;
subtype int is System.OS_Interface.int;
subtype unsigned is System.OS_Interface.unsigned;
function Is_Task_Context return Boolean is
begin
- return System.OS_Interface.Interrupt_Context /= 1;
+ return System.OS_Interface.Interrupt_Context = 0;
end Is_Task_Context;
----------------
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type BOOL is new int;
+ -- Equivalent of the C type BOOL
+
type vx_freq_t is new unsigned;
-- Equivalent of the C type _Vx_freq_t
Parameter : System.Address := System.Null_Address) return int;
pragma Import (C, Interrupt_Connect, "intConnect");
- function Interrupt_Context return int;
+ function Interrupt_Context return BOOL;
pragma Import (C, Interrupt_Context, "intContext");
function Interrupt_Number_To_Vector
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type BOOL is new int;
+ -- Equivalent of the C type BOOL
+
type vx_freq_t is new unsigned;
-- Equivalent of the C type _Vx_freq_t
Parameter : System.Address := System.Null_Address) return int;
pragma Import (C, Interrupt_Connect, "intConnect");
- function Interrupt_Context return int;
+ function Interrupt_Context return BOOL;
pragma Import (C, Interrupt_Context, "intContext");
function Interrupt_Number_To_Vector
-- Interrupt_Context --
-----------------------
- function Interrupt_Context return int is
+ function Interrupt_Context return BOOL is
begin
-- For RTPs, never in an interrupt context
-- Interrupt_Context --
-----------------------
- function Interrupt_Context return int is
+ function Interrupt_Context return BOOL is
begin
-- For RTPs, never in an interrupt context
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type BOOL is new int;
+ -- Equivalent of the C type BOOL
+
type vx_freq_t is new unsigned;
-- Equivalent of the C type _Vx_freq_t
Parameter : System.Address := System.Null_Address) return int;
pragma Convention (C, Interrupt_Connect);
- function Interrupt_Context return int;
+ function Interrupt_Context return BOOL;
pragma Convention (C, Interrupt_Context);
function Interrupt_Number_To_Vector
OK : constant STATUS := 0;
ERROR : constant STATUS := -1;
+ type BOOL is new int;
+ -- Equivalent of the C type BOOL
+
type VOIDFUNCPTR is access procedure (parameter : System.Address);
type Interrupt_Vector is new System.Address;
type Exception_Vector is new System.Address;
-- The routine generates a wrapper around the user handler to save and
-- restore context
- function intContext return int;
- -- Binding to the C routine intContext. This function returns 1 only if the
- -- current execution state is in interrupt context.
+ function intContext return BOOL;
+ -- Binding to the C routine intContext. This function returns 1 (TRUE)
+ -- only if the current execution state is in interrupt context.
function intVecGet
(Vector : Interrupt_Vector) return VOIDFUNCPTR;
OK : constant STATUS := 0;
ERROR : constant STATUS := -1;
+ type BOOL is new int;
+ -- Equivalent of the C type BOOL
+
type VOIDFUNCPTR is access procedure (parameter : System.Address);
type Interrupt_Vector is new System.Address;
type Exception_Vector is new System.Address;
-- The routine generates a wrapper around the user handler to save and
-- restore context
- function intContext return int;
- -- Binding to the C routine intContext. This function returns 1 only if the
- -- current execution state is in interrupt context.
+ function intContext return BOOL;
+ -- Binding to the C routine intContext. This function returns 1 (TRUE)
+ -- only if the current execution state is in interrupt context.
function intVecGet
(Vector : Interrupt_Vector) return VOIDFUNCPTR;