1------------------------------------------------------------------------------
2--                                                                          --
3--                  GNAT 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-2017, Florida State University            --
10--                     Copyright (C) 1995-2019, AdaCore                     --
11--                                                                          --
12-- GNAT 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 3,  or (at your option) any later ver- --
15-- sion.  GNAT 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.                                     --
18--                                                                          --
19-- As a special exception under Section 7 of GPL version 3, you are granted --
20-- additional permissions described in the GCC Runtime Library Exception,   --
21-- version 3.1, as published by the Free Software Foundation.               --
22--                                                                          --
23-- You should have received a copy of the GNU General Public License and    --
24-- a copy of the GCC Runtime Library Exception along with this program;     --
25-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
26-- <http://www.gnu.org/licenses/>.                                          --
27--                                                                          --
28-- GNARL was developed by the GNARL team at Florida State University.       --
29-- Extensive contributions were provided by Ada Core Technologies, Inc.     --
30--                                                                          --
31------------------------------------------------------------------------------
32
33--  This version is for systems that do not support interrupts (or signals)
34
35package body System.Interrupts is
36
37   pragma Warnings (Off); -- kill warnings on unreferenced formals
38
39   use System.Tasking;
40
41   -----------------------
42   -- Local Subprograms --
43   -----------------------
44
45   procedure Unimplemented;
46   --  This procedure raises a Program_Error with an appropriate message
47   --  indicating that an unimplemented feature has been used.
48
49   --------------------
50   -- Attach_Handler --
51   --------------------
52
53   procedure Attach_Handler
54     (New_Handler : Parameterless_Handler;
55      Interrupt   : Interrupt_ID;
56      Static      : Boolean := False)
57   is
58   begin
59      Unimplemented;
60   end Attach_Handler;
61
62   -----------------------------
63   -- Bind_Interrupt_To_Entry --
64   -----------------------------
65
66   procedure Bind_Interrupt_To_Entry
67     (T       : Task_Id;
68      E       : Task_Entry_Index;
69      Int_Ref : System.Address)
70   is
71   begin
72      Unimplemented;
73   end Bind_Interrupt_To_Entry;
74
75   ---------------------
76   -- Block_Interrupt --
77   ---------------------
78
79   procedure Block_Interrupt (Interrupt : Interrupt_ID) is
80   begin
81      Unimplemented;
82   end Block_Interrupt;
83
84   ---------------------
85   -- Current_Handler --
86   ---------------------
87
88   function Current_Handler
89     (Interrupt : Interrupt_ID) return Parameterless_Handler
90   is
91   begin
92      Unimplemented;
93      return null;
94   end Current_Handler;
95
96   --------------------
97   -- Detach_Handler --
98   --------------------
99
100   procedure Detach_Handler
101     (Interrupt : Interrupt_ID;
102      Static    : Boolean := False)
103   is
104   begin
105      Unimplemented;
106   end Detach_Handler;
107
108   ------------------------------
109   -- Detach_Interrupt_Entries --
110   ------------------------------
111
112   procedure Detach_Interrupt_Entries (T : Task_Id) is
113   begin
114      Unimplemented;
115   end Detach_Interrupt_Entries;
116
117   ----------------------
118   -- Exchange_Handler --
119   ----------------------
120
121   procedure Exchange_Handler
122     (Old_Handler : out Parameterless_Handler;
123      New_Handler : Parameterless_Handler;
124      Interrupt   : Interrupt_ID;
125      Static      : Boolean := False)
126   is
127   begin
128      Old_Handler := null;
129      Unimplemented;
130   end Exchange_Handler;
131
132   --------------
133   -- Finalize --
134   --------------
135
136   procedure Finalize (Object : in out Static_Interrupt_Protection) is
137   begin
138      Unimplemented;
139   end Finalize;
140
141   -------------------------------------
142   -- Has_Interrupt_Or_Attach_Handler --
143   -------------------------------------
144
145   function Has_Interrupt_Or_Attach_Handler
146     (Object : access Dynamic_Interrupt_Protection)
147      return   Boolean
148   is
149      pragma Warnings (Off, Object);
150   begin
151      Unimplemented;
152      return True;
153   end Has_Interrupt_Or_Attach_Handler;
154
155   function Has_Interrupt_Or_Attach_Handler
156     (Object : access Static_Interrupt_Protection)
157      return   Boolean
158   is
159      pragma Warnings (Off, Object);
160   begin
161      Unimplemented;
162      return True;
163   end Has_Interrupt_Or_Attach_Handler;
164
165   ----------------------
166   -- Ignore_Interrupt --
167   ----------------------
168
169   procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
170   begin
171      Unimplemented;
172   end Ignore_Interrupt;
173
174   ----------------------
175   -- Install_Handlers --
176   ----------------------
177
178   procedure Install_Handlers
179     (Object       : access Static_Interrupt_Protection;
180      New_Handlers : New_Handler_Array)
181   is
182   begin
183      Unimplemented;
184   end Install_Handlers;
185
186   ---------------------------------
187   -- Install_Restricted_Handlers --
188   ---------------------------------
189
190   procedure Install_Restricted_Handlers
191     (Prio     : Any_Priority;
192      Handlers : New_Handler_Array)
193   is
194   begin
195      Unimplemented;
196   end Install_Restricted_Handlers;
197
198   ----------------
199   -- Is_Blocked --
200   ----------------
201
202   function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
203   begin
204      Unimplemented;
205      return True;
206   end Is_Blocked;
207
208   -----------------------
209   -- Is_Entry_Attached --
210   -----------------------
211
212   function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
213   begin
214      Unimplemented;
215      return True;
216   end Is_Entry_Attached;
217
218   -------------------------
219   -- Is_Handler_Attached --
220   -------------------------
221
222   function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
223   begin
224      Unimplemented;
225      return True;
226   end Is_Handler_Attached;
227
228   ----------------
229   -- Is_Ignored --
230   ----------------
231
232   function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
233   begin
234      Unimplemented;
235      return True;
236   end Is_Ignored;
237
238   -----------------
239   -- Is_Reserved --
240   -----------------
241
242   function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
243   begin
244      Unimplemented;
245      return True;
246   end Is_Reserved;
247
248   ---------------
249   -- Reference --
250   ---------------
251
252   function Reference (Interrupt : Interrupt_ID) return System.Address is
253   begin
254      Unimplemented;
255      return Interrupt'Address;
256   end Reference;
257
258   --------------------------------
259   -- Register_Interrupt_Handler --
260   --------------------------------
261
262   procedure Register_Interrupt_Handler
263     (Handler_Addr : System.Address)
264   is
265   begin
266      Unimplemented;
267   end Register_Interrupt_Handler;
268
269   -----------------------
270   -- Unblock_Interrupt --
271   -----------------------
272
273   procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
274   begin
275      Unimplemented;
276   end Unblock_Interrupt;
277
278   ------------------
279   -- Unblocked_By --
280   ------------------
281
282   function Unblocked_By (Interrupt : Interrupt_ID)
283     return System.Tasking.Task_Id is
284   begin
285      Unimplemented;
286      return null;
287   end Unblocked_By;
288
289   ------------------------
290   -- Unignore_Interrupt --
291   ------------------------
292
293   procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
294   begin
295      Unimplemented;
296   end Unignore_Interrupt;
297
298   -------------------
299   -- Unimplemented; --
300   -------------------
301
302   procedure Unimplemented is
303   begin
304      raise Program_Error with "interrupts/signals not implemented";
305   end Unimplemented;
306
307end System.Interrupts;
308