------------------------------------------------------------------------------
-- --
--- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
--- SYSTEM.INTERRUPT_MANAGEMENT.OPERATIONS --
+-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T . --
+-- O P E R A T I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2003, Ada Core Technologies --
+-- Copyright (C) 1995-2005, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
is
Result : Interfaces.C.int;
Mask : aliased sigset_t;
-
begin
Result := sigemptyset (Mask'Access);
pragma Assert (Result = 0);
is
Mask : aliased sigset_t;
Result : Interfaces.C.int;
-
begin
Result := sigemptyset (Mask'Access);
pragma Assert (Result = 0);
procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int;
-
begin
Result := pthread_sigmask
(SIG_SETMASK, +Interrupt_Mask_Ptr (Mask), null);
OMask : access Interrupt_Mask)
is
Result : Interfaces.C.int;
-
begin
Result := pthread_sigmask
(SIG_SETMASK, +Interrupt_Mask_Ptr (Mask), +Interrupt_Mask_Ptr (OMask));
procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int;
-
begin
Result := pthread_sigmask
(SIG_SETMASK, null, +Interrupt_Mask_Ptr (Mask));
is
Result : Interfaces.C.int;
Sig : aliased Signal;
-
begin
Result := sigwait (Mask, Sig'Access);
procedure Install_Default_Action (Interrupt : Interrupt_ID) is
Result : Interfaces.C.int;
-
begin
Result := sigaction
(Signal (Interrupt),
procedure Install_Ignore_Action (Interrupt : Interrupt_ID) is
Result : Interfaces.C.int;
-
begin
Result := sigaction (Signal (Interrupt), Ignore_Action'Access, null);
pragma Assert (Result = 0);
procedure Fill_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int;
-
begin
Result := sigfillset (Mask);
pragma Assert (Result = 0);
procedure Empty_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int;
-
begin
Result := sigemptyset (Mask);
pragma Assert (Result = 0);
Interrupt : Interrupt_ID)
is
Result : Interfaces.C.int;
-
begin
Result := sigaddset (Mask, Signal (Interrupt));
pragma Assert (Result = 0);
Interrupt : Interrupt_ID)
is
Result : Interfaces.C.int;
-
begin
Result := sigdelset (Mask, Signal (Interrupt));
pragma Assert (Result = 0);
Interrupt : Interrupt_ID) return Boolean
is
Result : Interfaces.C.int;
-
begin
Result := sigismember (Mask, Signal (Interrupt));
pragma Assert (Result = 0 or else Result = 1);
procedure Copy_Interrupt_Mask
(X : out Interrupt_Mask;
- Y : Interrupt_Mask)
- is
+ Y : Interrupt_Mask) is
begin
X := Y;
end Copy_Interrupt_Mask;
procedure Interrupt_Self_Process (Interrupt : Interrupt_ID) is
Result : Interfaces.C.int;
-
begin
Result := kill (getpid, Signal (Interrupt));
pragma Assert (Result = 0);
end Interrupt_Self_Process;
+ --------------------------
+ -- Setup_Interrupt_Mask --
+ --------------------------
+
+ procedure Setup_Interrupt_Mask is
+ begin
+ -- Mask task for all signals. The original mask of the Environment task
+ -- will be recovered by Interrupt_Manager task during the elaboration
+ -- of s-interr.adb.
+
+ Set_Interrupt_Mask (All_Tasks_Mask'Access);
+ end Setup_Interrupt_Mask;
+
begin
declare