source: rtems/c/src/ada/rtems.ads @ 372a382a

4.104.114.84.95
Last change on this file since 372a382a was bb566a02, checked in by Joel Sherrill <joel.sherrill@…>, on 07/10/97 at 20:24:00

Reordered specs.

  • Property mode set to 100644
File size: 43.3 KB
Line 
1--
2--  RTEMS / Specification
3--
4--  DESCRIPTION:
5--
6--  This package provides the interface to the RTEMS API.
7--
8--  DEPENDENCIES:
9--
10--
11--
12--  COPYRIGHT (c) 1997.
13--  On-Line Applications Research Corporation (OAR).
14--
15--  The license and distribution terms for this file may in
16--  the file LICENSE in this distribution or at
17--  http://www.OARcorp.com/rtems/license.html.
18--
19--  $Id$
20--
21
22with System;
23with System.Storage_Elements; use System.Storage_Elements;
24with Interfaces;
25with Interfaces.C;
26
27package RTEMS is
28
29   Structure_Alignment : constant := 8;
30
31   --
32   --  RTEMS Base Types
33   --
34
35   subtype Unsigned8  is Interfaces.Unsigned_8;
36   subtype Unsigned16 is Interfaces.Unsigned_16;
37   subtype Unsigned32 is Interfaces.Unsigned_32;
38
39   type Unsigned32_Pointer     is access all RTEMS.Unsigned32;
40   type Unsigned16_Pointer     is access all RTEMS.Unsigned16;
41   type Unsigned8_Pointer      is access all RTEMS.Unsigned8;
42
43   subtype Boolean             is RTEMS.Unsigned32;
44   subtype Address             is System.Address;
45   subtype Single              is Interfaces.C.C_float;
46   subtype Double              is Interfaces.C.Double;
47
48   --
49   --  The following define the size of each of the base types in
50   --  both bits and system units.
51   --
52
53   Unsigned8_Bits   : constant := 7;
54   Unsigned16_Bits  : constant := 15;
55   Unsigned32_Bits  : constant := 31;
56   Boolean_Bits     : constant := 31;
57   Address_Bits     : constant := 31;
58   Single_Bits      : constant := 31;
59   Double_Bits      : constant := 63;
60
61   Unsigned8_Units  : constant := 1;
62   Unsigned16_Units : constant := 2;
63   Unsigned32_Units : constant := 4;
64   Boolean_Units    : constant := 4;
65   Address_Units    : constant := 4;
66   Single_Units     : constant := 4;
67   Double_Units     : constant := 8;
68
69   Null_Address     : constant RTEMS.Address :=
70      System.Storage_Elements.To_Address(0);
71
72   True  : constant RTEMS.Boolean := 1;
73   False : constant RTEMS.Boolean := 0;
74
75   --  More Types
76   --
77
78   subtype Name                is RTEMS.Unsigned32;
79   subtype ID                  is RTEMS.Unsigned32;
80   subtype Interval            is RTEMS.Unsigned32;
81   subtype Attribute           is RTEMS.Unsigned32;
82   subtype Mode                is RTEMS.Unsigned32;
83   subtype Option              is RTEMS.Unsigned32;
84   subtype Task_Priority       is RTEMS.Unsigned32;
85   subtype Notepad_Index       is RTEMS.Unsigned32 range 0 .. 15;
86
87   subtype Event_Set           is RTEMS.Unsigned32;
88   subtype Signal_Set          is RTEMS.Unsigned32;
89   subtype Debug_Set           is RTEMS.Unsigned32;
90   subtype Device_Major_Number is RTEMS.Unsigned32;
91   subtype Device_Minor_Number is RTEMS.Unsigned32;
92   subtype Vector_Number       is RTEMS.Unsigned32;
93   subtype ISR_Level           is RTEMS.Unsigned32;
94
95   subtype Node                is RTEMS.Unsigned32;
96
97   --
98   --  Task Related Types
99   --  XXXX fix this
100   subtype Task_Argument       is RTEMS.Unsigned32;
101   type Task_Argument_PTR      is access all Task_Argument;
102
103   -- XXXX fix this
104   subtype TCB                 is RTEMS.Unsigned32;
105   type    TCB_Pointer         is access all RTEMS.TCB;
106
107   subtype Task_States         is RTEMS.Unsigned32;
108
109   type Task_Entry is access procedure (
110      Argument : RTEMS.Unsigned32
111   );
112
113   --
114   --  Clock and Time of Day Types
115   --
116
117   type Time_Of_Day is
118      record
119         Year    : RTEMS.Unsigned32; -- year, A.D.
120         Month   : RTEMS.Unsigned32; -- month, 1 .. 12
121         Day     : RTEMS.Unsigned32; -- day, 1 .. 31
122         Hour    : RTEMS.Unsigned32; -- hour, 0 .. 23
123         Minute  : RTEMS.Unsigned32; -- minute, 0 .. 59
124         Second  : RTEMS.Unsigned32; -- second, 0 .. 59
125         Ticks   : RTEMS.Unsigned32; -- elapsed ticks between seconds
126      end record;
127
128   type Clock_Time_Value is
129      record
130         Seconds      : RTEMS.Unsigned32;
131         Microseconds : RTEMS.Unsigned32;
132      end record;
133
134   type Clock_Get_Options is (
135      Clock_Get_TOD,
136      Clock_Get_Seconds_Since_Epoch,
137      Clock_Get_Ticks_Since_Boot,
138      Clock_Get_Ticks_Per_Seconds,
139      Clock_Get_Time_Value
140   );
141
142   --
143   --  Device Driver Entry Prototype
144   --
145
146   type Device_Driver_Entry is access function (
147      Major    : in     RTEMS.Device_Major_Number;
148      Minor    : in     RTEMS.Device_Major_Number;
149      Argument : in     RTEMS.Unsigned32;
150      ID       : in     RTEMS.Unsigned32
151   ) return RTEMS.Unsigned32;
152
153   type Driver_Address_Table_Entry is
154      record
155         Initialization : RTEMS.Device_Driver_Entry;
156         Open           : RTEMS.Device_Driver_Entry;
157         Close          : RTEMS.Device_Driver_Entry;
158         Read           : RTEMS.Device_Driver_Entry;
159         Write          : RTEMS.Device_Driver_Entry;
160         Control        : RTEMS.Device_Driver_Entry;
161      end record;
162
163   type Driver_Address_Table is array ( RTEMS.Unsigned32
164     range 1 .. RTEMS.Unsigned32'Last ) of RTEMS.Driver_Address_Table_Entry;
165
166   type Driver_Address_Table_Pointer is access all Driver_Address_Table;
167
168   type Driver_Name_t is
169      record
170         Device_Name        : RTEMS.Address;
171         Device_Name_Length : RTEMS.Unsigned32;
172         Major              : RTEMS.Device_Major_Number;
173         Minor              : RTEMS.Device_Minor_Number;
174
175      end record;
176
177   --
178   --  Ident Options
179   --
180
181   Search_All_Nodes : constant RTEMS.Node := 0;
182
183   --
184   --  Options
185   --
186
187   Default_Options    : constant RTEMS.Option    := 16#0000#;
188
189   Wait      : constant RTEMS.Option := 16#0000#;
190   No_Wait   : constant RTEMS.Option := 16#0001#;
191
192   Event_All : constant RTEMS.Option := 16#0000#;
193   Event_Any : constant RTEMS.Option := 16#0002#;
194
195   --
196   --  Mode constants
197   --
198
199   Default_Modes      : constant RTEMS.Mode      := 16#0000#;
200
201   All_Mode_Masks     : constant RTEMS.Mode := 16#0000_ffff#;
202   Current_Mode       : constant RTEMS.Mode := 16#0000_0000#;
203   Preempt_Mask       : constant RTEMS.Mode := 16#0000_0100#;
204   Timeslice_Mask     : constant RTEMS.Mode := 16#0000_0200#;
205   ASR_Mask           : constant RTEMS.Mode := 16#0000_0400#;
206   Interrupt_Mask     : RTEMS.Mode;
207   Preempt            : constant RTEMS.Mode := 16#0000_0000#;
208   No_Preempt         : constant RTEMS.Mode := 16#0000_0100#;
209   No_Timeslice       : constant RTEMS.Mode := 16#0000_0000#;
210   Timeslice          : constant RTEMS.Mode := 16#0000_0200#;
211   ASR                : constant RTEMS.Mode := 16#0000_0000#;
212   No_ASR             : constant RTEMS.Mode := 16#0000_0400#;
213
214   pragma Import (C, Interrupt_Mask, "rtems_interrupt_mask");
215
216   --
217   --  Attribute constants
218   --
219
220   Default_Attributes  : constant RTEMS.Attribute := 16#00000000#;
221   No_Floating_Point   : constant RTEMS.Attribute := 16#00000000#;
222   Floating_Point      : constant RTEMS.Attribute := 16#00000001#;
223   Local               : constant RTEMS.Attribute := 16#00000000#;
224   Global              : constant RTEMS.Attribute := 16#00000002#;
225   FIFO                : constant RTEMS.Attribute := 16#00000000#;
226   Priority            : constant RTEMS.Attribute := 16#00000004#;
227   Counting_Semaphore  : constant RTEMS.Attribute := 16#00000000#;
228   Binary_Semaphore    : constant RTEMS.Attribute := 16#00000010#;
229   No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#;
230   Inherit_Priority    : constant RTEMS.Attribute := 16#00000020#;
231   No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#;
232   Priority_Ceiling    : constant RTEMS.Attribute := 16#00000040#;
233
234   function Interrupt_Level (
235      Level : in     RTEMS.Unsigned32
236   ) return RTEMS.Attribute;
237   pragma Import (C, Interrupt_Level, "rtems_interrupt_level_attribute");
238   
239
240   Minimum_Stack_Size : RTEMS.Unsigned32;
241   pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size");
242
243
244   --
245   --  Notepad index constants
246   --
247
248   Notepad_0  : constant RTEMS.Unsigned32 := 0;
249   Notepad_1  : constant RTEMS.Unsigned32 := 1;
250   Notepad_2  : constant RTEMS.Unsigned32 := 2;
251   Notepad_3  : constant RTEMS.Unsigned32 := 3;
252   Notepad_4  : constant RTEMS.Unsigned32 := 4;
253   Notepad_5  : constant RTEMS.Unsigned32 := 5;
254   Notepad_6  : constant RTEMS.Unsigned32 := 6;
255   Notepad_7  : constant RTEMS.Unsigned32 := 7;
256   Notepad_8  : constant RTEMS.Unsigned32 := 8;
257   Notepad_9  : constant RTEMS.Unsigned32 := 9;
258   Notepad_10 : constant RTEMS.Unsigned32 := 10;
259   Notepad_11 : constant RTEMS.Unsigned32 := 11;
260   Notepad_12 : constant RTEMS.Unsigned32 := 12;
261   Notepad_13 : constant RTEMS.Unsigned32 := 13;
262   Notepad_14 : constant RTEMS.Unsigned32 := 14;
263   Notepad_15 : constant RTEMS.Unsigned32 := 15;
264
265   --
266   --  Miscellaneous
267   --
268
269   No_Timeout       : constant RTEMS.Interval := 0;
270   Self             : constant RTEMS.ID       := 0;
271   Period_Status    : constant RTEMS.Interval := 0;
272   Yield_Processor  : constant RTEMS.Interval := 0;
273   Current_Priority : constant RTEMS.Task_Priority := 0;
274   No_Priority      : constant RTEMS.Task_Priority := 0;
275
276
277   --
278   --  Extension Callouts and Table
279   --
280
281   type Thread_Create_Extension is access procedure (
282      Current_Task : in     RTEMS.TCB_Pointer;
283      New_Task     : in     RTEMS.TCB_Pointer
284   );
285
286   type Thread_Start_Extension is access procedure (
287      Current_Task : in     RTEMS.TCB_Pointer;
288      Started_Task : in     RTEMS.TCB_Pointer
289   );
290
291   type Thread_Restart_Extension is access procedure (
292      Current_Task   : in     RTEMS.TCB_Pointer;
293      Restarted_Task : in     RTEMS.TCB_Pointer
294   );
295
296   type Thread_Delete_Extension is access procedure (
297      Current_Task : in     RTEMS.TCB_Pointer;
298      Deleted_Task : in     RTEMS.TCB_Pointer
299   );
300
301   type Thread_Switch_Extension is access procedure (
302      Current_Task : in     RTEMS.TCB_Pointer;
303      Heir_Task    : in     RTEMS.TCB_Pointer
304   );
305
306   type Thread_Post_Switch_Extension is access procedure (
307      Current_Task : in     RTEMS.TCB_Pointer
308   );
309
310   type Thread_Begin_Extension is access procedure (
311      Current_Task : in     RTEMS.TCB_Pointer
312   );
313
314   type Thread_Exitted_Extension is access procedure (
315      Current_Task : in     RTEMS.TCB_Pointer
316   );
317
318   type Fatal_Error_Extension is access procedure (
319      Error : in     RTEMS.Unsigned32
320   );
321
322   type Extensions_Table is
323      record
324         Thread_Create      : RTEMS.Thread_Create_Extension;
325         Thread_Start       : RTEMS.Thread_Start_Extension;
326         Thread_Restart     : RTEMS.Thread_Restart_Extension;
327         Thread_Delete      : RTEMS.Thread_Delete_Extension;
328         Thread_Switch      : RTEMS.Thread_Switch_Extension;
329         Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension;
330         Thread_Begin       : RTEMS.Thread_Begin_Extension;
331         Thread_Exitted     : RTEMS.Thread_Exitted_Extension;
332         Fatal              : RTEMS.Fatal_Error_Extension;
333      end record;
334
335   type Extensions_Table_Pointer is access all Extensions_Table;
336
337   --
338   --  The following type define a pointer to a watchdog/timer service routine.
339   --
340
341   type Timer_Service_Routine is access procedure (
342      ID          : in     RTEMS.ID;
343      User_Data   : in     RTEMS.Address
344   );
345
346   --
347   --  The following type define a pointer to a signal service routine.
348   --
349
350   type ASR_Handler is access procedure (
351      Signals : in     RTEMS.Signal_Set
352   );
353
354   --
355   --  The following type defines the status information returned
356   --  about a period.
357   --
358
359   type Rate_Monotonic_Period_States is (
360     Inactive,               -- off chain, never initialized
361     Owner_Is_Blocking,      -- on chain, owner is blocking on it
362     Active,                 -- on chain, running continuously
363     Expired_While_Blocking, -- on chain, expired while owner was was blocking
364     Expired                 -- off chain, will be reset by next
365                             --   rtems_rate_monotonic_period
366   );
367
368   for Rate_Monotonic_Period_States'Size use 32;
369
370   for Rate_Monotonic_Period_States use (
371     Inactive                => 0,
372     Owner_Is_Blocking       => 1,
373     Active                  => 2,
374     Expired_While_Blocking  => 3,
375     Expired                 => 4
376   );
377
378   type Rate_Monotonic_Period_Status is
379      record
380         State                            : RTEMS.Rate_Monotonic_Period_States;
381         Ticks_Since_Last_Period          : RTEMS.Unsigned32;
382         Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32;
383      end record;
384
385   --
386   --  Method Completions Status Codes
387   --
388
389   type Status_Codes is (
390      Successful,               -- successful completion
391      Task_Exitted,             -- returned from a task
392      MP_Not_Configured,        -- multiprocessing not configured
393      Invalid_Name,             -- invalid object name
394      Invalid_ID,               -- invalid object id
395      Too_Many,                 -- too many
396      Timeout,                  -- timed out waiting
397      Object_Was_Deleted,       -- object deleted while waiting
398      Invalid_Size,             -- specified size was invalid
399      Invalid_Address,          -- address specified is invalid
400      Invalid_Number,           -- number was invalid
401      Not_Defined,              -- item has not been initialized
402      Resource_In_Use,          -- resources still outstanding
403      Unsatisfied,              -- request not satisfied
404      Incorrect_State,          -- task is in wrong state
405      Already_Suspended,        -- task already in state
406      Illegal_On_Self,          -- illegal on calling task
407      Illegal_On_Remote_Object, -- illegal for remote object
408      Called_From_ISR,          -- called from wrong environment
409      Invalid_Priority,         -- invalid task priority
410      Invalid_Clock,            -- invalid date/time
411      Invalid_Node,             -- invalid node id
412      Not_Configured,           -- directive not configured
413      Not_Owner_Of_Resource,    -- not owner of resource
414      Not_Implemented,          -- directive not implemented
415      Internal_Error,           -- RTEMS inconsistency detected
416      Proxy_Blocking,           -- internal multiprocessing only
417      No_Memory                 -- no memory left in heap
418   );
419
420   for Status_Codes'Size use 32;
421
422   for Status_Codes use (
423      Successful                  =>  0,
424      Task_Exitted                =>  1,
425      MP_Not_Configured           =>  2,
426      Invalid_Name                =>  3,
427      Invalid_ID                  =>  4,
428      Too_Many                    =>  5,
429      Timeout                     =>  6,
430      Object_Was_Deleted          =>  7,
431      Invalid_Size                =>  8,
432      Invalid_Address             =>  9,
433      Invalid_NumbeR              => 10,
434      Not_Defined                 => 11,
435      Resource_In_Use             => 12,
436      Unsatisfied                 => 13,
437      Incorrect_State             => 14,
438      Already_Suspended           => 15,
439      Illegal_On_Self             => 16,
440      Illegal_On_Remote_Object    => 17,
441      Called_From_ISR             => 18,
442      Invalid_Priority            => 19,
443      Invalid_Clock               => 20,
444      Invalid_Node                => 21,
445      Not_Configured              => 22,
446      Not_Owner_Of_Resource       => 23,
447      Not_ImplementeD             => 24,
448      Internal_Error              => 25,
449      Proxy_Blocking              => 26,
450      No_Memory                   => 27
451   );
452
453   --
454   --  RTEMS Events
455   --
456
457   Pending_Events : constant RTEMS.Event_Set := 16#0000_0000#;
458   All_Events     : constant RTEMS.Event_Set := 16#FFFF_FFFF#;
459   Event_0        : constant RTEMS.Event_Set := 16#0000_0001#;
460   Event_1        : constant RTEMS.Event_Set := 16#0000_0002#;
461   Event_2        : constant RTEMS.Event_Set := 16#0000_0004#;
462   Event_3        : constant RTEMS.Event_Set := 16#0000_0008#;
463   Event_4        : constant RTEMS.Event_Set := 16#0000_0010#;
464   Event_5        : constant RTEMS.Event_Set := 16#0000_0020#;
465   Event_6        : constant RTEMS.Event_Set := 16#0000_0040#;
466   Event_7        : constant RTEMS.Event_Set := 16#0000_0080#;
467   Event_8        : constant RTEMS.Event_Set := 16#0000_0100#;
468   Event_9        : constant RTEMS.Event_Set := 16#0000_0200#;
469   Event_10       : constant RTEMS.Event_Set := 16#0000_0400#;
470   Event_11       : constant RTEMS.Event_Set := 16#0000_0800#;
471   Event_12       : constant RTEMS.Event_Set := 16#0000_1000#;
472   Event_13       : constant RTEMS.Event_Set := 16#0000_2000#;
473   Event_14       : constant RTEMS.Event_Set := 16#0000_4000#;
474   Event_15       : constant RTEMS.Event_Set := 16#0000_8000#;
475   Event_16       : constant RTEMS.Event_Set := 16#0001_0000#;
476   Event_17       : constant RTEMS.Event_Set := 16#0002_0000#;
477   Event_18       : constant RTEMS.Event_Set := 16#0004_0000#;
478   Event_19       : constant RTEMS.Event_Set := 16#0008_0000#;
479   Event_20       : constant RTEMS.Event_Set := 16#0010_0000#;
480   Event_21       : constant RTEMS.Event_Set := 16#0020_0000#;
481   Event_22       : constant RTEMS.Event_Set := 16#0040_0000#;
482   Event_23       : constant RTEMS.Event_Set := 16#0080_0000#;
483   Event_24       : constant RTEMS.Event_Set := 16#0100_0000#;
484   Event_25       : constant RTEMS.Event_Set := 16#0200_0000#;
485   Event_26       : constant RTEMS.Event_Set := 16#0400_0000#;
486   Event_27       : constant RTEMS.Event_Set := 16#0800_0000#;
487   Event_28       : constant RTEMS.Event_Set := 16#1000_0000#;
488   Event_29       : constant RTEMS.Event_Set := 16#2000_0000#;
489   Event_30       : constant RTEMS.Event_Set := 16#4000_0000#;
490   Event_31       : constant RTEMS.Event_Set := 16#8000_0000#;
491
492   --
493   --  RTEMS Signals
494   --
495
496   All_Signals : constant RTEMS.Signal_Set := 16#7FFFFFFF#;
497   Signal_0    : constant RTEMS.Signal_Set := 16#00000001#;
498   Signal_1    : constant RTEMS.Signal_Set := 16#00000002#;
499   Signal_2    : constant RTEMS.Signal_Set := 16#00000004#;
500   Signal_3    : constant RTEMS.Signal_Set := 16#00000008#;
501   Signal_4    : constant RTEMS.Signal_Set := 16#00000010#;
502   Signal_5    : constant RTEMS.Signal_Set := 16#00000020#;
503   Signal_6    : constant RTEMS.Signal_Set := 16#00000040#;
504   Signal_7    : constant RTEMS.Signal_Set := 16#00000080#;
505   Signal_8    : constant RTEMS.Signal_Set := 16#00000100#;
506   Signal_9    : constant RTEMS.Signal_Set := 16#00000200#;
507   Signal_10   : constant RTEMS.Signal_Set := 16#00000400#;
508   Signal_11   : constant RTEMS.Signal_Set := 16#00000800#;
509   Signal_12   : constant RTEMS.Signal_Set := 16#00001000#;
510   Signal_13   : constant RTEMS.Signal_Set := 16#00002000#;
511   Signal_14   : constant RTEMS.Signal_Set := 16#00004000#;
512   Signal_15   : constant RTEMS.Signal_Set := 16#00008000#;
513   Signal_16   : constant RTEMS.Signal_Set := 16#00010000#;
514   Signal_17   : constant RTEMS.Signal_Set := 16#00020000#;
515   Signal_18   : constant RTEMS.Signal_Set := 16#00040000#;
516   Signal_19   : constant RTEMS.Signal_Set := 16#00080000#;
517   Signal_20   : constant RTEMS.Signal_Set := 16#00100000#;
518   Signal_21   : constant RTEMS.Signal_Set := 16#00200000#;
519   Signal_22   : constant RTEMS.Signal_Set := 16#00400000#;
520   Signal_23   : constant RTEMS.Signal_Set := 16#00800000#;
521   Signal_24   : constant RTEMS.Signal_Set := 16#01000000#;
522   Signal_25   : constant RTEMS.Signal_Set := 16#02000000#;
523   Signal_26   : constant RTEMS.Signal_Set := 16#04000000#;
524   Signal_27   : constant RTEMS.Signal_Set := 16#08000000#;
525   Signal_28   : constant RTEMS.Signal_Set := 16#10000000#;
526   Signal_29   : constant RTEMS.Signal_Set := 16#20000000#;
527   Signal_30   : constant RTEMS.Signal_Set := 16#40000000#;
528   Signal_31   : constant RTEMS.Signal_Set := 16#80000000#;
529
530   --
531   --  RTEMS API Configuration Information
532   --
533
534   type Initialization_Tasks_Table_Entry is
535      record
536         Name             : RTEMS.Name;          -- task name
537         Stack_Size       : RTEMS.Unsigned32;    -- task stack size
538         Initial_Priority : RTEMS.Task_priority; -- task priority
539         Attribute_Set    : RTEMS.Attribute;     -- task attributes
540         Entry_Point      : RTEMS.Task_Entry;    -- task entry point
541         Mode_Set         : RTEMS.Mode;          -- task initial mode
542         Argument         : RTEMS.Unsigned32;    -- task argument
543      end record;
544
545   type Initialization_Tasks_Table is array ( RTEMS.Unsigned32 range <> ) of
546     RTEMS.Initialization_Tasks_Table_Entry;
547
548   type Initialization_Tasks_Table_Pointer is access all
549        Initialization_Tasks_Table;
550
551   type API_Configuration_Table is
552      record
553         Maximum_Tasks                   : RTEMS.Unsigned32;
554         Maximum_Timers                  : RTEMS.Unsigned32;
555         Maximum_Semaphores              : RTEMS.Unsigned32;
556         Maximum_Message_queues          : RTEMS.Unsigned32;
557         Maximum_Partitions              : RTEMS.Unsigned32;
558         Maximum_Regions                 : RTEMS.Unsigned32;
559         Maximum_Ports                   : RTEMS.Unsigned32;
560         Maximum_Periods                 : RTEMS.Unsigned32;
561         Number_Of_Initialization_Tasks  : RTEMS.Unsigned32;
562         User_Initialization_Tasks_Table :
563                                   RTEMS.Initialization_Tasks_Table_Pointer;
564      end record;
565
566   type API_Configuration_Table_Pointer is access all API_Configuration_Table;
567
568   --
569   --  RTEMS POSIX API Configuration Information
570   --
571
572   type POSIX_Thread_Entry is access procedure (
573      Argument : in     RTEMS.Address
574   );
575
576   type POSIX_Initialization_Threads_Table_Entry is
577   record
578      Thread_Entry : RTEMS.POSIX_Thread_Entry;
579   end record;
580
581   type POSIX_Initialization_Threads_Table is array
582       ( RTEMS.Unsigned32 range <> ) of
583       RTEMS.POSIX_Initialization_Threads_Table_Entry;
584
585   type POSIX_Initialization_Threads_Table_Pointer is access all
586       POSIX_Initialization_Threads_Table;
587
588   type POSIX_API_Configuration_Table_Entry is
589      record
590         Maximum_Threads                 : Interfaces.C.Int;
591         Maximum_Mutexes                 : Interfaces.C.Int;
592         Maximum_Condition_Variables     : Interfaces.C.Int;
593         Maximum_Keys                    : Interfaces.C.Int;
594         Maximum_Queued_Signals          : Interfaces.C.Int;
595         Number_Of_Initialization_Tasks  : Interfaces.C.Int;
596         User_Initialization_Tasks_Table :
597            RTEMS.POSIX_Initialization_Threads_Table_Pointer;
598      end record;
599
600   type POSIX_API_Configuration_Table is array ( RTEMS.Unsigned32 range <> ) of
601      RTEMS.POSIX_API_Configuration_Table_Entry;
602
603   type POSIX_API_Configuration_Table_Pointer is access all
604          RTEMS.POSIX_API_Configuration_Table;
605
606   --
607   --  MPCI Information include MPCI Configuration
608   --
609
610   type Configuration_Table_Pointer;
611
612   type MP_Packet_Classes is (
613      MP_PACKET_MPCI_INTERNAL,
614      MP_PACKET_TASKS,
615      MP_PACKET_MESSAGE_QUEUE,
616      MP_PACKET_SEMAPHORE,
617      MP_PACKET_PARTITION,
618      MP_PACKET_REGION,
619      MP_PACKET_EVENT,
620      MP_PACKET_SIGNAL
621   );
622
623   for MP_Packet_Classes use (
624      MP_PACKET_MPCI_INTERNAL    => 0,
625      MP_PACKET_TASKS            => 1,
626      MP_PACKET_MESSAGE_QUEUE    => 2,
627      MP_PACKET_SEMAPHORE        => 3,
628      MP_PACKET_PARTITION        => 4,
629      MP_PACKET_REGION           => 5,
630      MP_PACKET_EVENT            => 6,
631      MP_PACKET_SIGNAL           => 7
632   );
633
634   type Packet_Prefix is
635      record
636         The_Class       : RTEMS.MP_Packet_Classes;
637         ID              : RTEMS.ID;
638         Source_TID      : RTEMS.ID;
639         Source_Priority : RTEMS.Task_Priority;
640         Return_Code     : RTEMS.Unsigned32;
641         Length          : RTEMS.Unsigned32;
642         To_Convert      : RTEMS.Unsigned32;
643         Timeout         : RTEMS.Interval;
644      end record;
645
646   type Packet_Prefix_Pointer is access all Packet_Prefix;
647
648   type MPCI_Initialization_Entry is access procedure (
649      Configuration : in     RTEMS.Configuration_Table_Pointer
650   );
651
652   type MPCI_Get_Packet_Entry is access procedure (
653      Packet : access RTEMS.Packet_Prefix_Pointer
654   );
655
656   type MPCI_Return_Packet_Entry is access procedure (
657      Packet : in     RTEMS.Packet_Prefix_Pointer
658   );
659
660   type MPCI_Send_Entry is access procedure (
661      Packet : in     RTEMS.Packet_Prefix_Pointer
662   );
663
664   type MPCI_Receive_Entry is access procedure (
665      Packet : access RTEMS.Packet_Prefix_Pointer
666   );
667
668   type MPCI_Table is
669      record
670         Default_Timeout     : RTEMS.Unsigned32; -- in ticks
671         Maximum_Packet_Size : RTEMS.Unsigned32;
672         Initialization      : RTEMS.MPCI_Initialization_Entry;
673         Get_Packet          : RTEMS.MPCI_Get_Packet_Entry;
674         Return_Packet       : RTEMS.MPCI_Return_Packet_Entry;
675         Send                : RTEMS.MPCI_Send_Entry;
676         Receive             : RTEMS.MPCI_Receive_Entry;
677      end record;
678
679   type MPCI_Table_Pointer is access all MPCI_Table;
680
681   --
682   --  Configuration Information
683   --
684
685   type Multiprocessing_Table is
686      record
687         Node                   : RTEMS.Unsigned32;
688         Maximum_Nodes          : RTEMS.Unsigned32;
689         Maximum_Global_Objects : RTEMS.Unsigned32;
690         Maximum_Proxies        : RTEMS.Unsigned32;
691         User_MPCI_Table        : RTEMS.MPCI_Table_Pointer;
692      end record;
693
694   type Multiprocessing_Table_Pointer is access all Multiprocessing_Table;
695
696   type Configuration_Table is
697      record
698          Work_Space_Start           : RTEMS.Address;
699          Work_Space_Size            : RTEMS.Unsigned32;
700          Maximum_Extensions         : RTEMS.Unsigned32;
701          Microseconds_Per_Tick      : RTEMS.Unsigned32;
702          Ticks_Per_Timeslice        : RTEMS.Unsigned32;
703          Maximum_Devices            : RTEMS.Unsigned32;
704          Number_Of_Device_Drivers   : RTEMS.Unsigned32;
705          Device_Driver_Table        : RTEMS.Driver_Address_Table_Pointer;
706          User_Extension_Table       : RTEMS.Extensions_Table_Pointer;
707          User_Multiprocessing_Table : RTEMS.Multiprocessing_Table_Pointer;
708          RTEMS_API_Configuration    : RTEMS.API_Configuration_Table_Pointer;
709          POSIX_API_Configuration    : RTEMS.POSIX_API_Configuration_Table_Pointer;
710      end record;
711
712   type Configuration_Table_Pointer is access all Configuration_Table;
713
714   --
715   --  For now, do not provide access to the CPU Table from Ada.
716   --  When this type is provided, a CPU dependent file must
717   --  define it.
718   --
719
720   subtype CPU_Table is RTEMS.Address;
721   type CPU_Table_Pointer is access all CPU_Table;
722
723   --
724   --  Utility Functions
725   --
726
727   function From_Ada_Boolean (
728      Ada_Boolean : Standard.Boolean
729   ) return RTEMS.Boolean;
730
731   function To_Ada_Boolean (
732      RTEMS_Boolean : RTEMS.Boolean
733   ) return Standard.Boolean;
734
735   function Milliseconds_To_Microseconds (
736      Milliseconds : RTEMS.Unsigned32
737   ) return RTEMS.Unsigned32;
738
739   function Microseconds_To_Ticks (
740      Microseconds : RTEMS.Unsigned32
741   ) return RTEMS.Interval;
742
743   function Milliseconds_To_Ticks (
744      Milliseconds : RTEMS.Unsigned32
745   ) return RTEMS.Interval;
746
747   function Build_Name (
748      C1 : in     Character;
749      C2 : in     Character;
750      C3 : in     Character;
751      C4 : in     Character
752   ) return RTEMS.Name;
753
754   procedure Name_To_Characters (
755      Name : in     RTEMS.Name;
756      C1   :    out Character;
757      C2   :    out Character;
758      C3   :    out Character;
759      C4   :    out Character
760   );
761
762   function Get_Node (
763      ID : in     RTEMS.ID
764   ) return RTEMS.Unsigned32;
765
766   function Get_Index (
767      ID : in     RTEMS.ID
768   ) return RTEMS.Unsigned32;
769
770   function Are_Statuses_Equal (
771      Status  : in     RTEMS.Status_Codes;
772      Desired : in     RTEMS.Status_Codes
773   ) return Standard.Boolean;
774
775   function Is_Status_Successful (
776      Status  : in     RTEMS.Status_Codes
777   ) return Standard.Boolean;
778
779   function Subtract (
780      Left   : in     RTEMS.Address;
781      Right  : in     RTEMS.Address
782   ) return RTEMS.Unsigned32;
783
784   function Are_Equal (
785      Left   : in     RTEMS.Address;
786      Right  : in     RTEMS.Address
787   ) return Standard.Boolean;
788   --
789   --  RTEMS API
790   --
791
792   --
793   --  Initialization Manager
794   --
795
796   procedure Initialize_Executive (
797      Configuration_Table   : in     RTEMS.Configuration_Table_Pointer;
798      CPU_Table             : in     RTEMS.CPU_Table_Pointer
799   );
800
801   procedure Initialize_Executive_Early (
802      Configuration_Table : in     RTEMS.Configuration_Table_Pointer;
803      CPU_Table           : in     RTEMS.CPU_Table_Pointer;
804      Level               :    out RTEMS.ISR_Level
805   );
806
807   procedure Initialize_Executive_Late (
808      BSP_Level : in    RTEMS.ISR_Level
809   );
810
811   procedure Shutdown_Executive (
812      Result : in     RTEMS.Unsigned32
813   );
814
815   --
816   --  Task Manager
817   --
818
819   procedure Task_Create (
820      Name             : in     RTEMS.Name;
821      Initial_Priority : in     RTEMS.Task_Priority;
822      Stack_Size       : in     Unsigned32;
823      Initial_Modes    : in     RTEMS.Mode;
824      Attribute_Set    : in     RTEMS.Attribute;
825      ID               :    out RTEMS.ID;
826      Result           :    out RTEMS.Status_Codes
827   );
828
829   procedure Task_Ident (
830      Name   : in     RTEMS.Name;
831      Node   : in     RTEMS.Node;
832      ID     :    out RTEMS.ID;
833      Result :    out RTEMS.Status_Codes
834   );
835
836   procedure Task_Start (
837      ID          : in     RTEMS.ID;
838      Entry_Point : in     RTEMS.Task_Entry;
839      Argument    : in     RTEMS.Task_Argument;
840      Result      :    out RTEMS.Status_Codes
841   );
842
843   procedure Task_Restart (
844      ID       : in     RTEMS.ID;
845      Argument : in     RTEMS.Task_Argument;
846      Result   :    out RTEMS.Status_Codes
847   );
848
849   procedure Task_Delete (
850      ID     : in     RTEMS.ID;
851      Result :    out RTEMS.Status_Codes
852   );
853
854   procedure Task_Suspend (
855      ID     : in     RTEMS.ID;
856      Result :    out RTEMS.Status_Codes
857   );
858
859   procedure Task_Resume (
860      ID     : in     RTEMS.ID;
861      Result :    out RTEMS.Status_Codes
862   );
863
864   procedure Task_Set_Priority (
865      ID           : in     RTEMS.ID;
866      New_Priority : in     RTEMS.Task_Priority;
867      Old_Priority :    out RTEMS.Task_Priority;
868      Result       :    out RTEMS.Status_Codes
869   );
870
871   procedure Task_Mode (
872      Mode_Set          : in     RTEMS.Mode;
873      Mask              : in     RTEMS.Mode;
874      Previous_Mode_Set :    out RTEMS.Mode;
875      Result            :    out RTEMS.Status_Codes
876   );
877
878   procedure Task_Get_Note (
879      ID      : in     RTEMS.ID;
880      Notepad : in     RTEMS.Notepad_Index;
881      Note    :    out RTEMS.Unsigned32;
882      Result  :    out RTEMS.Status_Codes
883   );
884
885   procedure Task_Set_Note (
886      ID      : in     RTEMS.ID;
887      Notepad : in     RTEMS.Notepad_Index;
888      Note    : in     RTEMS.Unsigned32;
889      Result  :    out RTEMS.Status_Codes
890   );
891
892   procedure Task_Wake_When (
893      Time_Buffer : in     RTEMS.Time_Of_Day;
894      Result      :    out RTEMS.Status_Codes
895   );
896
897   procedure Task_Wake_After (
898      Ticks  : in     RTEMS.Interval;
899      Result :    out RTEMS.Status_Codes
900   );
901
902   --
903   --  Interrupt Manager
904   --
905
906   procedure Interrupt_Catch (
907      New_ISR_Handler : in     RTEMS.Address;
908      Vector          : in     RTEMS.Vector_Number;
909      Old_ISR_Handler :    out RTEMS.Address;
910      Result          :    out RTEMS.Status_Codes
911   );
912
913   function Interrupt_Disable
914   return RTEMS.ISR_Level;
915
916   procedure Interrupt_Enable (
917      Level : in     RTEMS.ISR_Level
918   );
919
920   procedure Interrupt_Flash (
921      Level : in     RTEMS.ISR_Level
922   );
923
924   function Interrupt_Is_In_Progress
925   return RTEMS.Boolean;
926
927   --
928   --  Clock Manager
929   --
930
931   procedure Clock_Get (
932      Option      : in     RTEMS.Clock_Get_Options;
933      Time_Buffer : in     RTEMS.Address;
934      Result      :    out RTEMS.Status_Codes
935   );
936
937   procedure Clock_Set (
938      Time_Buffer : in     RTEMS.Time_Of_Day;
939      Result      :    out RTEMS.Status_Codes
940   );
941
942   procedure Clock_Tick (
943      Result :    out RTEMS.Status_Codes
944   );
945
946   --
947   --  Extension Manager
948   --
949
950   procedure Extension_Create (
951      Name   : in     RTEMS.Name;
952      Table  : in     RTEMS.Extensions_Table_Pointer;
953      ID     :    out RTEMS.ID;
954      Result :    out RTEMS.Status_Codes
955   );
956
957   procedure Extension_Ident (
958      Name   : in     RTEMS.Name;
959      ID     :    out RTEMS.ID;
960      Result :    out RTEMS.Status_Codes
961   );
962
963   procedure Extension_Delete (
964      ID     : in     RTEMS.ID;
965      Result :    out RTEMS.Status_Codes
966   );
967
968
969   --
970   --  Timer Manager
971   --
972
973   procedure Timer_Create (
974      Name   : in     RTEMS.Name;
975      ID     :    out RTEMS.ID;
976      Result :    out RTEMS.Status_Codes
977   );
978
979   procedure Timer_Ident (
980      Name   : in     RTEMS.Name;
981      ID     :    out RTEMS.ID;
982      Result :    out RTEMS.Status_Codes
983   );
984
985   procedure Timer_Delete (
986      ID     : in     RTEMS.ID;
987      Result :    out RTEMS.Status_Codes
988   );
989
990   procedure Timer_Fire_After (
991      ID        : in     RTEMS.ID;
992      Ticks     : in     RTEMS.Interval;
993      Routine   : in     RTEMS.Timer_Service_Routine;
994      User_Data : in     RTEMS.Address;
995      Result    :    out RTEMS.Status_Codes
996   );
997
998   procedure Timer_Fire_When (
999      ID        : in     RTEMS.ID;
1000      Wall_Time : in     RTEMS.Time_Of_Day;
1001      Routine   : in     RTEMS.Timer_Service_Routine;
1002      User_Data : in     RTEMS.Address;
1003      Result    :    out RTEMS.Status_Codes
1004   );
1005
1006   procedure Timer_Reset (
1007      ID     : in     RTEMS.ID;
1008      Result :    out RTEMS.Status_Codes
1009   );
1010
1011   procedure Timer_Cancel (
1012      ID     : in     RTEMS.ID;
1013      Result :    out RTEMS.Status_Codes
1014   );
1015
1016   --
1017   --  Semaphore Manager
1018   --
1019
1020   procedure Semaphore_Create (
1021      Name             : in     RTEMS.Name;
1022      Count            : in     RTEMS.Unsigned32;
1023      Attribute_Set    : in     RTEMS.Attribute;
1024      Priority_Ceiling : in     RTEMS.Task_Priority;
1025      ID               :    out RTEMS.ID;
1026      Result           :    out RTEMS.Status_Codes
1027   );
1028
1029   procedure Semaphore_Delete (
1030      ID     : in     RTEMS.ID;
1031      Result :    out RTEMS.Status_Codes
1032   );
1033
1034   procedure Semaphore_Ident (
1035      Name   : in     RTEMS.Name;
1036      Node   : in     RTEMS.Unsigned32;
1037      ID     :    out RTEMS.ID;
1038      Result :    out RTEMS.Status_Codes
1039   );
1040
1041   procedure Semaphore_Obtain (
1042      ID         : in     RTEMS.ID;
1043      Option_Set : in     RTEMS.Option;
1044      Timeout    : in     RTEMS.Interval;
1045      Result     :    out RTEMS.Status_Codes
1046   );
1047
1048   procedure Semaphore_Release (
1049      ID     : in     RTEMS.ID;
1050      Result :    out RTEMS.Status_Codes
1051   );
1052
1053
1054   --
1055   --  Message Queue Manager
1056   --
1057
1058   procedure Message_Queue_Create (
1059      Name             : in     RTEMS.Name;
1060      Count            : in     RTEMS.Unsigned32;
1061      Max_Message_Size : in     RTEMS.Unsigned32;
1062      Attribute_Set    : in     RTEMS.Attribute;
1063      ID               :    out RTEMS.ID;
1064      Result           :    out RTEMS.Status_Codes
1065   );
1066
1067   procedure Message_Queue_Ident (
1068      Name   : in     RTEMS.Name;
1069      Node   : in     RTEMS.Unsigned32;
1070      ID     :    out RTEMS.ID;
1071      Result :    out RTEMS.Status_Codes
1072   );
1073
1074   procedure Message_Queue_Delete (
1075      ID     : in     RTEMS.ID;
1076      Result :    out RTEMS.Status_Codes
1077   );
1078
1079   procedure Message_Queue_Send (
1080      ID     : in     RTEMS.ID;
1081      Buffer : in     RTEMS.Address;
1082      Size   : in     RTEMS.Unsigned32;
1083      Result :    out RTEMS.Status_Codes
1084   );
1085
1086   procedure Message_Queue_Urgent (
1087      ID     : in     RTEMS.ID;
1088      Buffer : in     RTEMS.Address;
1089      Size   : in     RTEMS.Unsigned32;
1090      Result :    out RTEMS.Status_Codes
1091   );
1092
1093   procedure Message_Queue_Broadcast (
1094      ID     : in     RTEMS.ID;
1095      Buffer : in     RTEMS.Address;
1096      Size   : in     RTEMS.Unsigned32;
1097      Count  :    out RTEMS.Unsigned32;
1098      Result :    out RTEMS.Status_Codes
1099   );
1100
1101   procedure Message_Queue_Receive (
1102      ID         : in     RTEMS.ID;
1103      Buffer     : in     RTEMS.Address;
1104      Option_Set : in     RTEMS.Option;
1105      Timeout    : in     RTEMS.Interval;
1106      Size       :    out RTEMS.Unsigned32;
1107      Result     :    out RTEMS.Status_Codes
1108   );
1109
1110   procedure Message_Queue_Flush (
1111      ID     : in     RTEMS.ID;
1112      Count  :    out RTEMS.Unsigned32;
1113      Result :    out RTEMS.Status_Codes
1114   );
1115
1116
1117   --
1118   --  Event Manager
1119   --
1120
1121   procedure Event_Send (
1122      ID       : in     RTEMS.ID;
1123      Event_In : in     RTEMS.Event_Set;
1124      Result   :    out RTEMS.Status_Codes
1125   );
1126
1127   procedure Event_Receive (
1128      Event_In   : in     RTEMS.Event_Set;
1129      Option_Set : in     RTEMS.Option;
1130      Ticks      : in     RTEMS.Interval;
1131      Event_Out  :    out RTEMS.Event_Set;
1132      Result     :    out RTEMS.Status_Codes
1133   );
1134
1135   --
1136   --  Signal Manager
1137   --
1138
1139   procedure Signal_Catch (
1140      ASR_Handler : in     RTEMS.ASR_Handler;
1141      Mode_Set    : in     RTEMS.Mode;
1142      Result      :    out RTEMS.Status_Codes
1143   );
1144
1145   procedure Signal_Send (
1146      ID         : in     RTEMS.ID;
1147      Signal_Set : in     RTEMS.Signal_Set;
1148      Result     :    out RTEMS.Status_Codes
1149   );
1150
1151
1152   --
1153   --  Partition Manager
1154   --
1155
1156   procedure Partition_Create (
1157      Name             : in     RTEMS.Name;
1158      Starting_Address : in     RTEMS.Address;
1159      Length           : in     RTEMS.Unsigned32;
1160      Buffer_Size      : in     RTEMS.Unsigned32;
1161      Attribute_Set    : in     RTEMS.Attribute;
1162      ID               :    out RTEMS.ID;
1163      Result           :    out RTEMS.Status_Codes
1164   );
1165
1166   procedure Partition_Ident (
1167      Name   : in     RTEMS.Name;
1168      Node   : in     RTEMS.Unsigned32;
1169      ID     :    out RTEMS.ID;
1170      Result :    out RTEMS.Status_Codes
1171   );
1172
1173   procedure Partition_Delete (
1174      ID     : in     RTEMS.ID;
1175      Result :    out RTEMS.Status_Codes
1176   );
1177
1178   procedure Partition_Get_Buffer (
1179      ID     : in     RTEMS.ID;
1180      Buffer :    out RTEMS.Address;
1181      Result :    out RTEMS.Status_Codes
1182   );
1183
1184   procedure Partition_Return_Buffer (
1185      ID     : in     RTEMS.ID;
1186      Buffer : in     RTEMS.Address;
1187      Result :    out RTEMS.Status_Codes
1188   );
1189
1190
1191   --
1192   --  Region Manager
1193   --
1194
1195   procedure Region_Create (
1196      Name             : in     RTEMS.Name;
1197      Starting_Address : in     RTEMS.Address;
1198      Length           : in     RTEMS.Unsigned32;
1199      Page_Size        : in     RTEMS.Unsigned32;
1200      Attribute_Set    : in     RTEMS.Attribute;
1201      ID               :    out RTEMS.ID;
1202      Result           :    out RTEMS.Status_Codes
1203   );
1204
1205   procedure Region_Ident (
1206      Name   : in     RTEMS.Name;
1207      ID     :    out RTEMS.ID;
1208      Result :    out RTEMS.Status_Codes
1209   );
1210
1211   procedure Region_Delete (
1212      ID     : in     RTEMS.ID;
1213      Result :    out RTEMS.Status_Codes
1214   );
1215
1216   procedure Region_Extend (
1217      ID               : in     RTEMS.ID;
1218      Starting_Address : in     RTEMS.Address;
1219      Length           : in     RTEMS.Unsigned32;
1220      Result           :    out RTEMS.Status_Codes
1221   );
1222
1223   procedure Region_Get_Segment (
1224      ID         : in     RTEMS.ID;
1225      Size       : in     RTEMS.Unsigned32;
1226      Option_Set : in     RTEMS.Option;
1227      Timeout    : in     RTEMS.Interval;
1228      Segment    :    out RTEMS.Address;
1229      Result     :    out RTEMS.Status_Codes
1230   );
1231
1232   procedure Region_Get_Segment_Size (
1233      ID         : in     RTEMS.ID;
1234      Segment    : in     RTEMS.Address;
1235      Size       :    out RTEMS.Unsigned32;
1236      Result     :    out RTEMS.Status_Codes
1237   );
1238
1239   procedure Region_Return_Segment (
1240      ID      : in     RTEMS.ID;
1241      Segment : in     RTEMS.Address;
1242      Result  :    out RTEMS.Status_Codes
1243   );
1244
1245
1246   --
1247   --  Dual Ported Memory Manager
1248   --
1249
1250   procedure Port_Create (
1251      Name           : in     RTEMS.Name;
1252      Internal_Start : in     RTEMS.Address;
1253      External_Start : in     RTEMS.Address;
1254      Length         : in     RTEMS.Unsigned32;
1255      ID             :    out RTEMS.ID;
1256      Result         :    out RTEMS.Status_Codes
1257   );
1258
1259   procedure Port_Ident (
1260      Name   : in     RTEMS.Name;
1261      ID     :    out RTEMS.ID;
1262      Result :    out RTEMS.Status_Codes
1263   );
1264
1265   procedure Port_Delete (
1266      ID     : in     RTEMS.ID;
1267      Result :    out RTEMS.Status_Codes
1268   );
1269
1270   procedure Port_External_To_Internal (
1271      ID       : in     RTEMS.ID;
1272      External : in     RTEMS.Address;
1273      Internal :    out RTEMS.Address;
1274      Result   :    out RTEMS.Status_Codes
1275   );
1276
1277   procedure Port_Internal_To_External (
1278      ID       : in     RTEMS.ID;
1279      Internal : in     RTEMS.Address;
1280      External :    out RTEMS.Address;
1281      Result   :    out RTEMS.Status_Codes
1282   );
1283
1284   --
1285   --  Input/Output Manager
1286   --
1287
1288   procedure IO_Initialize (
1289      Major        : in     RTEMS.Device_Major_Number;
1290      Minor        : in     RTEMS.Device_Minor_Number;
1291      Argument     : in     RTEMS.Address;
1292      Return_Value :    out RTEMS.Unsigned32;
1293      Result       :    out RTEMS.Status_Codes
1294   );
1295
1296   procedure IO_Register_Name (
1297      Name   : in     String;
1298      Major  : in     RTEMS.Device_Major_Number;
1299      Minor  : in     RTEMS.Device_Minor_Number;
1300      Result :    out RTEMS.Status_Codes
1301   );
1302
1303   procedure IO_Lookup_Name (
1304      Name         : in     String;
1305      Device_Info  :    out RTEMS.Driver_Name_t;
1306      Result       :    out RTEMS.Status_Codes
1307   );
1308
1309   procedure IO_Open (
1310      Major        : in     RTEMS.Device_Major_Number;
1311      Minor        : in     RTEMS.Device_Minor_Number;
1312      Argument     : in     RTEMS.Address;
1313      Return_Value :    out RTEMS.Unsigned32;
1314      Result       :    out RTEMS.Status_Codes
1315   );
1316
1317   procedure IO_Close (
1318      Major        : in     RTEMS.Device_Major_Number;
1319      Minor        : in     RTEMS.Device_Minor_Number;
1320      Argument     : in     RTEMS.Address;
1321      Return_Value :    out RTEMS.Unsigned32;
1322      Result       :    out RTEMS.Status_Codes
1323   );
1324
1325   procedure IO_Read (
1326      Major        : in     RTEMS.Device_Major_Number;
1327      Minor        : in     RTEMS.Device_Minor_Number;
1328      Argument     : in     RTEMS.Address;
1329      Return_Value :    out RTEMS.Unsigned32;
1330      Result       :    out RTEMS.Status_Codes
1331   );
1332
1333   procedure IO_Write (
1334      Major        : in     RTEMS.Device_Major_Number;
1335      Minor        : in     RTEMS.Device_Minor_Number;
1336      Argument     : in     RTEMS.Address;
1337      Return_Value :    out RTEMS.Unsigned32;
1338      Result       :    out RTEMS.Status_Codes
1339   );
1340
1341   procedure IO_Control (
1342      Major        : in     RTEMS.Device_Major_Number;
1343      Minor        : in     RTEMS.Device_Minor_Number;
1344      Argument     : in     RTEMS.Address;
1345      Return_Value :    out RTEMS.Unsigned32;
1346      Result       :    out RTEMS.Status_Codes
1347   );
1348
1349
1350   --
1351   --  Fatal Error Manager
1352   --
1353
1354   procedure Fatal_Error_Occurred (
1355      The_Error : in     RTEMS.Unsigned32
1356   );
1357
1358
1359   --
1360   --  Rate Monotonic Manager
1361   --
1362
1363   procedure Rate_Monotonic_Create (
1364      Name   : in     RTEMS.Name;
1365      ID     :    out RTEMS.ID;
1366      Result :    out RTEMS.Status_Codes
1367   );
1368
1369   procedure Rate_Monotonic_Ident (
1370      Name   : in     RTEMS.Name;
1371      ID     :    out RTEMS.ID;
1372      Result :    out RTEMS.Status_Codes
1373   );
1374
1375   procedure Rate_Monotonic_Delete (
1376      ID     : in     RTEMS.ID;
1377      Result :    out RTEMS.Status_Codes
1378   );
1379
1380   procedure Rate_Monotonic_Cancel (
1381      ID     : in     RTEMS.ID;
1382      Result :    out RTEMS.Status_Codes
1383   );
1384
1385   procedure Rate_Monotonic_Period (
1386      ID      : in     RTEMS.ID;
1387      Length  : in     RTEMS.Interval;
1388      Result  :    out RTEMS.Status_Codes
1389   );
1390
1391   procedure Rate_Monotonic_Get_Status (
1392      ID      : in     RTEMS.ID;
1393      Status  :    out RTEMS.Rate_Monotonic_Period_Status;
1394      Result  :    out RTEMS.Status_Codes
1395   );
1396
1397   --
1398   --  Multiprocessing Manager
1399   --
1400
1401   procedure Multiprocessing_Announce;
1402
1403
1404   --
1405   --  Debug Manager
1406   --
1407
1408   Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#;
1409   Debug_Region   : constant RTEMS.Debug_Set := 16#00000001#;
1410
1411   procedure Debug_Enable (
1412      To_Be_Enabled : in     RTEMS.Debug_Set
1413   );
1414
1415   procedure Debug_Disable (
1416      To_Be_Disabled : in     RTEMS.Debug_Set
1417   );
1418
1419   function Debug_Is_Enabled (
1420      Level : in     RTEMS.Debug_Set
1421   ) return RTEMS.Boolean;
1422
1423  --
1424  --  Some Useful Data Items
1425  --
1426
1427  Configuration : RTEMS.Configuration_Table_Pointer;
1428  pragma Import (C, Configuration, "_Configuration_Table");
1429
1430
1431private
1432end RTEMS;
Note: See TracBrowser for help on using the repository browser.