OSDN Git Service

gcc/ada/
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-interr-dummy.adb
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-1994, Florida State University            --
10 --                     Copyright (C) 1995-2005, AdaCore                     --
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,  51  Franklin  Street,  Fifth  Floor, --
21 -- Boston, MA 02110-1301, 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 version is for systems that do not support interrupts (or signals)
36
37 with Ada.Exceptions;
38
39 package body System.Interrupts is
40
41    pragma Warnings (Off); -- kill warnings on unreferenced formals
42
43    use System.Tasking;
44
45    -----------------------
46    -- Local Subprograms --
47    -----------------------
48
49    procedure Unimplemented;
50    --  This procedure raises a Program_Error with an appropriate message
51    --  indicating that an unimplemented feature has been used.
52
53    --------------------
54    -- Attach_Handler --
55    --------------------
56
57    procedure Attach_Handler
58      (New_Handler : Parameterless_Handler;
59       Interrupt   : Interrupt_ID;
60       Static      : Boolean := False)
61    is
62    begin
63       Unimplemented;
64    end Attach_Handler;
65
66    -----------------------------
67    -- Bind_Interrupt_To_Entry --
68    -----------------------------
69
70    procedure Bind_Interrupt_To_Entry
71      (T       : Task_Id;
72       E       : Task_Entry_Index;
73       Int_Ref : System.Address)
74    is
75    begin
76       Unimplemented;
77    end Bind_Interrupt_To_Entry;
78
79    ---------------------
80    -- Block_Interrupt --
81    ---------------------
82
83    procedure Block_Interrupt (Interrupt : Interrupt_ID) is
84    begin
85       Unimplemented;
86    end Block_Interrupt;
87
88    ---------------------
89    -- Current_Handler --
90    ---------------------
91
92    function Current_Handler
93      (Interrupt : Interrupt_ID) return Parameterless_Handler
94    is
95    begin
96       Unimplemented;
97       return null;
98    end Current_Handler;
99
100    --------------------
101    -- Detach_Handler --
102    --------------------
103
104    procedure Detach_Handler
105      (Interrupt : Interrupt_ID;
106       Static    : Boolean := False)
107    is
108    begin
109       Unimplemented;
110    end Detach_Handler;
111
112    ------------------------------
113    -- Detach_Interrupt_Entries --
114    ------------------------------
115
116    procedure Detach_Interrupt_Entries (T : Task_Id) is
117    begin
118       Unimplemented;
119    end Detach_Interrupt_Entries;
120
121    ----------------------
122    -- Exchange_Handler --
123    ----------------------
124
125    procedure Exchange_Handler
126      (Old_Handler : out Parameterless_Handler;
127       New_Handler : Parameterless_Handler;
128       Interrupt   : Interrupt_ID;
129       Static      : Boolean := False)
130    is
131    begin
132       Old_Handler := null;
133       Unimplemented;
134    end Exchange_Handler;
135
136    --------------
137    -- Finalize --
138    --------------
139
140    procedure Finalize (Object : in out Static_Interrupt_Protection) is
141    begin
142       Unimplemented;
143    end Finalize;
144
145    -------------------------------------
146    -- Has_Interrupt_Or_Attach_Handler --
147    -------------------------------------
148
149    function Has_Interrupt_Or_Attach_Handler
150      (Object : access Dynamic_Interrupt_Protection)
151       return   Boolean
152    is
153       pragma Warnings (Off, Object);
154    begin
155       Unimplemented;
156       return True;
157    end Has_Interrupt_Or_Attach_Handler;
158
159    function Has_Interrupt_Or_Attach_Handler
160      (Object : access Static_Interrupt_Protection)
161       return   Boolean
162    is
163       pragma Warnings (Off, Object);
164    begin
165       Unimplemented;
166       return True;
167    end Has_Interrupt_Or_Attach_Handler;
168
169    ----------------------
170    -- Ignore_Interrupt --
171    ----------------------
172
173    procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
174    begin
175       Unimplemented;
176    end Ignore_Interrupt;
177
178    ----------------------
179    -- Install_Handlers --
180    ----------------------
181
182    procedure Install_Handlers
183      (Object       : access Static_Interrupt_Protection;
184       New_Handlers : New_Handler_Array)
185    is
186    begin
187       Unimplemented;
188    end Install_Handlers;
189
190    ----------------
191    -- Is_Blocked --
192    ----------------
193
194    function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
195    begin
196       Unimplemented;
197       return True;
198    end Is_Blocked;
199
200    -----------------------
201    -- Is_Entry_Attached --
202    -----------------------
203
204    function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
205    begin
206       Unimplemented;
207       return True;
208    end Is_Entry_Attached;
209
210    -------------------------
211    -- Is_Handler_Attached --
212    -------------------------
213
214    function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
215    begin
216       Unimplemented;
217       return True;
218    end Is_Handler_Attached;
219
220    ----------------
221    -- Is_Ignored --
222    ----------------
223
224    function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
225    begin
226       Unimplemented;
227       return True;
228    end Is_Ignored;
229
230    -----------------
231    -- Is_Reserved --
232    -----------------
233
234    function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
235    begin
236       Unimplemented;
237       return True;
238    end Is_Reserved;
239
240    ---------------
241    -- Reference --
242    ---------------
243
244    function Reference (Interrupt : Interrupt_ID) return System.Address is
245    begin
246       Unimplemented;
247       return Interrupt'Address;
248    end Reference;
249
250    --------------------------------
251    -- Register_Interrupt_Handler --
252    --------------------------------
253
254    procedure Register_Interrupt_Handler
255      (Handler_Addr : System.Address)
256    is
257    begin
258       Unimplemented;
259    end Register_Interrupt_Handler;
260
261    -----------------------
262    -- Unblock_Interrupt --
263    -----------------------
264
265    procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
266    begin
267       Unimplemented;
268    end Unblock_Interrupt;
269
270    ------------------
271    -- Unblocked_By --
272    ------------------
273
274    function Unblocked_By (Interrupt : Interrupt_ID)
275      return System.Tasking.Task_Id is
276    begin
277       Unimplemented;
278       return null;
279    end Unblocked_By;
280
281    ------------------------
282    -- Unignore_Interrupt --
283    ------------------------
284
285    procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
286    begin
287       Unimplemented;
288    end Unignore_Interrupt;
289
290    -------------------
291    -- Unimplemented; --
292    -------------------
293
294    procedure Unimplemented is
295    begin
296       Ada.Exceptions.Raise_Exception
297         (Program_Error'Identity, "interrupts/signals not implemented");
298       raise Program_Error;
299    end Unimplemented;
300
301 end System.Interrupts;