OSDN Git Service

PR c++/9704
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-inmaop.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS               --
4 --                                                                          --
5 --            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 .       --
6 --                             O P E R A T I O N S                          --
7 --                                                                          --
8 --                                  S p e c                                 --
9 --                                                                          --
10 --                                                                          --
11 --          Copyright (C) 1992-1998, Free Software Foundation, Inc.         --
12 --                                                                          --
13 -- GNARL is free software; you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNARL; see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- As a special exception,  if other files  instantiate  generics from this --
25 -- unit, or you link  this unit with other files  to produce an executable, --
26 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
27 -- covered  by the  GNU  General  Public  License.  This exception does not --
28 -- however invalidate  any other reasons why  the executable file  might be --
29 -- covered by the  GNU Public License.                                      --
30 --                                                                          --
31 -- GNARL was developed by the GNARL team at Florida State University.       --
32 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
33 --                                                                          --
34 ------------------------------------------------------------------------------
35
36 package System.Interrupt_Management.Operations is
37
38    procedure Thread_Block_Interrupt (Interrupt : Interrupt_ID);
39    --  Mask the calling thread for the interrupt
40    pragma Inline (Thread_Block_Interrupt);
41
42    procedure Thread_Unblock_Interrupt (Interrupt : Interrupt_ID);
43    --  Unmask the calling thread for the interrupt
44    pragma Inline (Thread_Unblock_Interrupt);
45
46    procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask);
47    --  Set the interrupt mask of the calling thread
48    procedure Set_Interrupt_Mask
49      (Mask  : access Interrupt_Mask;
50       OMask : access Interrupt_Mask);
51    --  Set the interrupt mask of the calling thread while returning the
52    --  previous Mask.
53    pragma Inline (Set_Interrupt_Mask);
54
55    procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask);
56    --  Get the interrupt mask of the calling thread
57    pragma Inline (Get_Interrupt_Mask);
58
59    function Interrupt_Wait (Mask : access Interrupt_Mask) return Interrupt_ID;
60    --  Wait for the interrupts specified in Mask and return
61    --  the interrupt received. Upon error it return 0.
62    pragma Inline (Interrupt_Wait);
63
64    procedure Install_Default_Action (Interrupt : Interrupt_ID);
65    --  Set the sigaction of the Interrupt to default (SIG_DFL).
66    pragma Inline (Install_Default_Action);
67
68    procedure Install_Ignore_Action (Interrupt : Interrupt_ID);
69    --  Set the sigaction of the Interrupt to ignore (SIG_IGN).
70    pragma Inline (Install_Ignore_Action);
71
72    procedure Fill_Interrupt_Mask (Mask : access Interrupt_Mask);
73    --  Get a Interrupt_Mask with all the interrupt masked
74    pragma Inline (Fill_Interrupt_Mask);
75
76    procedure Empty_Interrupt_Mask (Mask : access Interrupt_Mask);
77    --  Get a Interrupt_Mask with all the interrupt unmasked
78    pragma Inline (Empty_Interrupt_Mask);
79
80    procedure Add_To_Interrupt_Mask
81      (Mask      : access Interrupt_Mask;
82       Interrupt : Interrupt_ID);
83    --  Mask the given interrupt in the Interrupt_Mask
84    pragma Inline (Add_To_Interrupt_Mask);
85
86    procedure Delete_From_Interrupt_Mask
87      (Mask      : access Interrupt_Mask;
88       Interrupt : Interrupt_ID);
89    --  Unmask the given interrupt in the Interrupt_Mask
90    pragma Inline (Delete_From_Interrupt_Mask);
91
92    function Is_Member
93      (Mask      : access Interrupt_Mask;
94       Interrupt : Interrupt_ID) return Boolean;
95    --  See if a given interrupt is masked in the Interrupt_Mask
96    pragma Inline (Is_Member);
97
98    procedure Copy_Interrupt_Mask (X : out Interrupt_Mask; Y : Interrupt_Mask);
99    --  Assigment needed for limited private type Interrupt_Mask.
100    pragma Inline (Copy_Interrupt_Mask);
101
102    procedure Interrupt_Self_Process (Interrupt : Interrupt_ID);
103    --  raise an Interrupt process-level
104    pragma Inline (Interrupt_Self_Process);
105
106    --  The following objects serve as constants, but are initialized
107    --  in the body to aid portability.  These actually belong to the
108    --  System.Interrupt_Management but since Interrupt_Mask is a
109    --  private type we can not have them declared there.
110
111    Environment_Mask : aliased Interrupt_Mask;
112    --  This mask represents the mask of Environment task when this package
113    --  is being elaborated, except the signals being
114    --  forced to be unmasked by RTS (items in Keep_Unmasked)
115
116    All_Tasks_Mask : aliased Interrupt_Mask;
117    --  This is the mask of all tasks created in RTS. Only one task in RTS
118    --  is responsible for masking/unmasking signals (see s-interr.adb).
119
120 end System.Interrupt_Management.Operations;