source: rtems/cpukit/ada/rtems.ads @ 3774c7f

4.104.114.84.95
Last change on this file since 3774c7f was 7003847, checked in by Joel Sherrill <joel.sherrill@…>, on 02/01/02 at 18:58:21

2001-02-01 Joel Sherrill <joel@…>

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