2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / ada / 5ointerr.adb
blob7dbe33f26a71367d3edb6117a406a07515d30fcc
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 ------------------------------------------------------------------------------
35 -- This is an OS/2 version of this package.
37 -- This version is a stub, for systems that
38 -- do not support interrupts (or signals).
40 with Ada.Exceptions;
42 package body System.Interrupts is
44 pragma Warnings (Off); -- kill warnings on unreferenced formals
46 use System.Tasking;
48 -----------------------
49 -- Local Subprograms --
50 -----------------------
52 procedure Unimplemented;
53 -- This procedure raises a Program_Error with an appropriate message
54 -- indicating that an unimplemented feature has been used.
56 --------------------
57 -- Attach_Handler --
58 --------------------
60 procedure Attach_Handler
61 (New_Handler : Parameterless_Handler;
62 Interrupt : Interrupt_ID;
63 Static : Boolean := False)
65 begin
66 Unimplemented;
67 end Attach_Handler;
69 -----------------------------
70 -- Bind_Interrupt_To_Entry --
71 -----------------------------
73 procedure Bind_Interrupt_To_Entry
74 (T : Task_ID;
75 E : Task_Entry_Index;
76 Int_Ref : System.Address)
78 begin
79 Unimplemented;
80 end Bind_Interrupt_To_Entry;
82 ---------------------
83 -- Block_Interrupt --
84 ---------------------
86 procedure Block_Interrupt (Interrupt : Interrupt_ID) is
87 begin
88 Unimplemented;
89 end Block_Interrupt;
91 ---------------------
92 -- Current_Handler --
93 ---------------------
95 function Current_Handler
96 (Interrupt : Interrupt_ID)
97 return Parameterless_Handler
99 begin
100 Unimplemented;
101 return null;
102 end Current_Handler;
104 --------------------
105 -- Detach_Handler --
106 --------------------
108 procedure Detach_Handler
109 (Interrupt : Interrupt_ID;
110 Static : Boolean := False)
112 begin
113 Unimplemented;
114 end Detach_Handler;
116 ------------------------------
117 -- Detach_Interrupt_Entries --
118 ------------------------------
120 procedure Detach_Interrupt_Entries (T : Task_ID) is
121 begin
122 Unimplemented;
123 end Detach_Interrupt_Entries;
125 ----------------------
126 -- Exchange_Handler --
127 ----------------------
129 procedure Exchange_Handler
130 (Old_Handler : out Parameterless_Handler;
131 New_Handler : Parameterless_Handler;
132 Interrupt : Interrupt_ID;
133 Static : Boolean := False)
135 begin
136 Old_Handler := null;
137 Unimplemented;
138 end Exchange_Handler;
140 --------------
141 -- Finalize --
142 --------------
144 procedure Finalize (Object : in out Static_Interrupt_Protection) is
145 begin
146 Unimplemented;
147 end Finalize;
149 -------------------------------------
150 -- Has_Interrupt_Or_Attach_Handler --
151 -------------------------------------
153 function Has_Interrupt_Or_Attach_Handler
154 (Object : access Dynamic_Interrupt_Protection)
155 return Boolean
157 pragma Warnings (Off, Object);
159 begin
160 Unimplemented;
161 return True;
162 end Has_Interrupt_Or_Attach_Handler;
164 function Has_Interrupt_Or_Attach_Handler
165 (Object : access Static_Interrupt_Protection)
166 return Boolean
168 pragma Warnings (Off, Object);
170 begin
171 Unimplemented;
172 return True;
173 end Has_Interrupt_Or_Attach_Handler;
175 ----------------------
176 -- Ignore_Interrupt --
177 ----------------------
179 procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
180 begin
181 Unimplemented;
182 end Ignore_Interrupt;
184 ----------------------
185 -- Install_Handlers --
186 ----------------------
188 procedure Install_Handlers
189 (Object : access Static_Interrupt_Protection;
190 New_Handlers : New_Handler_Array)
192 begin
193 Unimplemented;
194 end Install_Handlers;
196 ----------------
197 -- Is_Blocked --
198 ----------------
200 function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
201 begin
202 Unimplemented;
203 return True;
204 end Is_Blocked;
206 -----------------------
207 -- Is_Entry_Attached --
208 -----------------------
210 function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
211 begin
212 Unimplemented;
213 return True;
214 end Is_Entry_Attached;
216 -------------------------
217 -- Is_Handler_Attached --
218 -------------------------
220 function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
221 begin
222 Unimplemented;
223 return True;
224 end Is_Handler_Attached;
226 ----------------
227 -- Is_Ignored --
228 ----------------
230 function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
231 begin
232 Unimplemented;
233 return True;
234 end Is_Ignored;
236 -----------------
237 -- Is_Reserved --
238 -----------------
240 function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
241 begin
242 Unimplemented;
243 return True;
244 end Is_Reserved;
246 ---------------
247 -- Reference --
248 ---------------
250 function Reference (Interrupt : Interrupt_ID) return System.Address is
251 begin
252 Unimplemented;
253 return Interrupt'Address;
254 end Reference;
256 --------------------------------
257 -- Register_Interrupt_Handler --
258 --------------------------------
260 procedure Register_Interrupt_Handler
261 (Handler_Addr : System.Address)
263 begin
264 Unimplemented;
265 end Register_Interrupt_Handler;
267 -----------------------
268 -- Unblock_Interrupt --
269 -----------------------
271 procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
272 begin
273 Unimplemented;
274 end Unblock_Interrupt;
276 ------------------
277 -- Unblocked_By --
278 ------------------
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;
287 ------------------------
288 -- Unignore_Interrupt --
289 ------------------------
291 procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
292 begin
293 Unimplemented;
294 end Unignore_Interrupt;
296 -------------------
297 -- Unimplemented; --
298 -------------------
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;
307 end System.Interrupts;