source: rtems/c/src/ada/rtems.ads @ 0442eed

4.104.114.95
Last change on this file since 0442eed was 0442eed, checked in by Joel Sherrill <joel.sherrill@…>, on 05/06/08 at 23:17:28

2008-05-06 Joel Sherrill <joel.sherrill@…>

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