source: rtems/c/src/ada/rtems.ads @ f040148

4.9
Last change on this file since f040148 was f040148, checked in by Joel Sherrill <joel.sherrill@…>, on 11/20/08 at 15:14:42

2008-11-20 Joel Sherrill <joel.sherrill@…>

PR 1339/Ada

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