OSDN Git Service

PR bootstrap/11932
[pf3gnuchains/gcc-fork.git] / gcc / ada / 5ointerr.adb
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 S                    --
6 --                                                                          --
7 --                                  B o d y                                 --
8 --                                                                          --
9 --             Copyright (C) 1991-1994, Florida State University            --
10 --             Copyright (C) 1995-2003, Ada Core Technologies               --
11 --                                                                          --
12 -- GNARL is free software; you can  redistribute it  and/or modify it under --
13 -- terms of the  GNU General Public License as published  by the Free Soft- --
14 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
15 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
18 -- for  more details.  You should have  received  a copy of the GNU General --
19 -- Public License  distributed with GNARL; see file COPYING.  If not, write --
20 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
21 -- MA 02111-1307, USA.                                                      --
22 --                                                                          --
23 -- As a special exception,  if other files  instantiate  generics from this --
24 -- unit, or you link  this unit with other files  to produce an executable, --
25 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
26 -- covered  by the  GNU  General  Public  License.  This exception does not --
27 -- however invalidate  any other reasons why  the executable file  might be --
28 -- covered by the  GNU Public License.                                      --
29 --                                                                          --
30 -- GNARL was developed by the GNARL team at Florida State University.       --
31 -- Extensive contributions were provided by Ada Core Technologies, Inc.     --
32 --                                                                          --
33 ------------------------------------------------------------------------------
34
35 --  This is an OS/2 version of this package.
36
37 --  This version is a stub, for systems that
38 --  do not support interrupts (or signals).
39
40 with Ada.Exceptions;
41
42 package body System.Interrupts is
43
44    pragma Warnings (Off); -- kill warnings on unreferenced formals
45
46    use System.Tasking;
47
48    -----------------------
49    -- Local Subprograms --
50    -----------------------
51
52    procedure Unimplemented;
53    --  This procedure raises a Program_Error with an appropriate message
54    --  indicating that an unimplemented feature has been used.
55
56    --------------------
57    -- Attach_Handler --
58    --------------------
59
60    procedure Attach_Handler
61      (New_Handler : Parameterless_Handler;
62       Interrupt   : Interrupt_ID;
63       Static      : Boolean := False)
64    is
65    begin
66       Unimplemented;
67    end Attach_Handler;
68
69    -----------------------------
70    -- Bind_Interrupt_To_Entry --
71    -----------------------------
72
73    procedure Bind_Interrupt_To_Entry
74      (T       : Task_ID;
75       E       : Task_Entry_Index;
76       Int_Ref : System.Address)
77    is
78    begin
79       Unimplemented;
80    end Bind_Interrupt_To_Entry;
81
82    ---------------------
83    -- Block_Interrupt --
84    ---------------------
85
86    procedure Block_Interrupt (Interrupt : Interrupt_ID) is
87    begin
88       Unimplemented;
89    end Block_Interrupt;
90
91    ---------------------
92    -- Current_Handler --
93    ---------------------
94
95    function Current_Handler
96      (Interrupt : Interrupt_ID)
97       return      Parameterless_Handler
98    is
99    begin
100       Unimplemented;
101       return null;
102    end Current_Handler;
103
104    --------------------
105    -- Detach_Handler --
106    --------------------
107
108    procedure Detach_Handler
109      (Interrupt : Interrupt_ID;
110       Static    : Boolean := False)
111    is
112    begin
113       Unimplemented;
114    end Detach_Handler;
115
116    ------------------------------
117    -- Detach_Interrupt_Entries --
118    ------------------------------
119
120    procedure Detach_Interrupt_Entries (T : Task_ID) is
121    begin
122       Unimplemented;
123    end Detach_Interrupt_Entries;
124
125    ----------------------
126    -- Exchange_Handler --
127    ----------------------
128
129    procedure Exchange_Handler
130      (Old_Handler : out Parameterless_Handler;
131       New_Handler : Parameterless_Handler;
132       Interrupt   : Interrupt_ID;
133       Static      : Boolean := False)
134    is
135    begin
136       Old_Handler := null;
137       Unimplemented;
138    end Exchange_Handler;
139
140    --------------
141    -- Finalize --
142    --------------
143
144    procedure Finalize (Object : in out Static_Interrupt_Protection) is
145    begin
146       Unimplemented;
147    end Finalize;
148
149    -------------------------------------
150    -- Has_Interrupt_Or_Attach_Handler --
151    -------------------------------------
152
153    function Has_Interrupt_Or_Attach_Handler
154      (Object : access Dynamic_Interrupt_Protection)
155       return   Boolean
156    is
157       pragma Warnings (Off, Object);
158
159    begin
160       Unimplemented;
161       return True;
162    end Has_Interrupt_Or_Attach_Handler;
163
164    function Has_Interrupt_Or_Attach_Handler
165      (Object : access Static_Interrupt_Protection)
166       return   Boolean
167    is
168       pragma Warnings (Off, Object);
169
170    begin
171       Unimplemented;
172       return True;
173    end Has_Interrupt_Or_Attach_Handler;
174
175    ----------------------
176    -- Ignore_Interrupt --
177    ----------------------
178
179    procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
180    begin
181       Unimplemented;
182    end Ignore_Interrupt;
183
184    ----------------------
185    -- Install_Handlers --
186    ----------------------
187
188    procedure Install_Handlers
189      (Object       : access Static_Interrupt_Protection;
190       New_Handlers : New_Handler_Array)
191    is
192    begin
193       Unimplemented;
194    end Install_Handlers;
195
196    ----------------
197    -- Is_Blocked --
198    ----------------
199
200    function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
201    begin
202       Unimplemented;
203       return True;
204    end Is_Blocked;
205
206    -----------------------
207    -- Is_Entry_Attached --
208    -----------------------
209
210    function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
211    begin
212       Unimplemented;
213       return True;
214    end Is_Entry_Attached;
215
216    -------------------------
217    -- Is_Handler_Attached --
218    -------------------------
219
220    function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
221    begin
222       Unimplemented;
223       return True;
224    end Is_Handler_Attached;
225
226    ----------------
227    -- Is_Ignored --
228    ----------------
229
230    function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
231    begin
232       Unimplemented;
233       return True;
234    end Is_Ignored;
235
236    -----------------
237    -- Is_Reserved --
238    -----------------
239
240    function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
241    begin
242       Unimplemented;
243       return True;
244    end Is_Reserved;
245
246    ---------------
247    -- Reference --
248    ---------------
249
250    function Reference (Interrupt : Interrupt_ID) return System.Address is
251    begin
252       Unimplemented;
253       return Interrupt'Address;
254    end Reference;
255
256    --------------------------------
257    -- Register_Interrupt_Handler --
258    --------------------------------
259
260    procedure Register_Interrupt_Handler
261      (Handler_Addr : System.Address)
262    is
263    begin
264       Unimplemented;
265    end Register_Interrupt_Handler;
266
267    -----------------------
268    -- Unblock_Interrupt --
269    -----------------------
270
271    procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
272    begin
273       Unimplemented;
274    end Unblock_Interrupt;
275
276    ------------------
277    -- Unblocked_By --
278    ------------------
279
280    function Unblocked_By (Interrupt : Interrupt_ID)
281      return System.Tasking.Task_ID is
282    begin
283       Unimplemented;
284       return null;
285    end Unblocked_By;
286
287    ------------------------
288    -- Unignore_Interrupt --
289    ------------------------
290
291    procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
292    begin
293       Unimplemented;
294    end Unignore_Interrupt;
295
296    -------------------
297    -- Unimplemented; --
298    -------------------
299
300    procedure Unimplemented is
301    begin
302       Ada.Exceptions.Raise_Exception
303         (Program_Error'Identity, "interrupts/signals not implemented");
304       raise Program_Error;
305    end Unimplemented;
306
307 end System.Interrupts;