1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . I N T E R R U P T S --
10 -- Copyright (C) 1991-2001 Florida State University --
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. --
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. --
30 -- GNARL was developed by the GNARL team at Florida State University. It is --
31 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
32 -- State University (http://www.gnat.com). --
34 ------------------------------------------------------------------------------
36 -- This is an OS/2 version of this package.
38 -- This version is a stub, for systems that
39 -- do not support interrupts (or signals).
43 package body System.Interrupts is
45 pragma Warnings (Off); -- kill warnings on unreferenced formals
49 -----------------------
50 -- Local Subprograms --
51 -----------------------
53 procedure Unimplemented;
54 -- This procedure raises a Program_Error with an appropriate message
55 -- indicating that an unimplemented feature has been used.
61 procedure Attach_Handler
62 (New_Handler : in Parameterless_Handler;
63 Interrupt : in Interrupt_ID;
64 Static : in Boolean := False)
70 -----------------------------
71 -- Bind_Interrupt_To_Entry --
72 -----------------------------
74 procedure Bind_Interrupt_To_Entry
77 Int_Ref : System.Address)
81 end Bind_Interrupt_To_Entry;
87 procedure Block_Interrupt (Interrupt : Interrupt_ID) is
96 function Current_Handler
97 (Interrupt : Interrupt_ID)
98 return Parameterless_Handler
109 procedure Detach_Handler
110 (Interrupt : in Interrupt_ID;
111 Static : in Boolean := False)
117 ------------------------------
118 -- Detach_Interrupt_Entries --
119 ------------------------------
121 procedure Detach_Interrupt_Entries (T : Task_ID) is
124 end Detach_Interrupt_Entries;
126 ----------------------
127 -- Exchange_Handler --
128 ----------------------
130 procedure Exchange_Handler
131 (Old_Handler : out Parameterless_Handler;
132 New_Handler : in Parameterless_Handler;
133 Interrupt : in Interrupt_ID;
134 Static : in Boolean := False)
139 end Exchange_Handler;
145 procedure Finalize (Object : in out Static_Interrupt_Protection) is
150 -------------------------------------
151 -- Has_Interrupt_Or_Attach_Handler --
152 -------------------------------------
154 function Has_Interrupt_Or_Attach_Handler
155 (Object : access Dynamic_Interrupt_Protection)
161 end Has_Interrupt_Or_Attach_Handler;
163 function Has_Interrupt_Or_Attach_Handler
164 (Object : access Static_Interrupt_Protection)
170 end Has_Interrupt_Or_Attach_Handler;
172 ----------------------
173 -- Ignore_Interrupt --
174 ----------------------
176 procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
179 end Ignore_Interrupt;
181 ----------------------
182 -- Install_Handlers --
183 ----------------------
185 procedure Install_Handlers
186 (Object : access Static_Interrupt_Protection;
187 New_Handlers : in New_Handler_Array)
191 end Install_Handlers;
197 function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
203 -----------------------
204 -- Is_Entry_Attached --
205 -----------------------
207 function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
211 end Is_Entry_Attached;
213 -------------------------
214 -- Is_Handler_Attached --
215 -------------------------
217 function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
221 end Is_Handler_Attached;
227 function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
237 function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
247 function Reference (Interrupt : Interrupt_ID) return System.Address is
250 return Interrupt'Address;
253 --------------------------------
254 -- Register_Interrupt_Handler --
255 --------------------------------
257 procedure Register_Interrupt_Handler
258 (Handler_Addr : System.Address)
262 end Register_Interrupt_Handler;
264 -----------------------
265 -- Unblock_Interrupt --
266 -----------------------
268 procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
271 end Unblock_Interrupt;
277 function Unblocked_By (Interrupt : Interrupt_ID)
278 return System.Tasking.Task_ID is
284 ------------------------
285 -- Unignore_Interrupt --
286 ------------------------
288 procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
291 end Unignore_Interrupt;
297 procedure Unimplemented is
299 Ada.Exceptions.Raise_Exception
300 (Program_Error'Identity, "interrupts/signals not implemented");
304 end System.Interrupts;