mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2007-04-02 Jennifer Averett <jennifer.averrett@oarcorp.com>
* rtems.adb, rtems.ads: Update.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2007-04-02 Jennifer Averett <jennifer.averrett@oarcorp.com>
|
||||
|
||||
* rtems.adb, rtems.ads: Update.
|
||||
|
||||
2005-05-23 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* rtems.adb: Fix variable name.
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
--
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997-2003.
|
||||
-- COPYRIGHT (c) 1997-2007.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
-- rtems.adb,v 1.13.2.2 2003/09/04 18:46:47 joel Exp
|
||||
--
|
||||
|
||||
with Ada;
|
||||
@@ -215,25 +215,6 @@ package body RTEMS is
|
||||
-- RTEMS API
|
||||
--
|
||||
|
||||
--
|
||||
-- Initialization Manager
|
||||
--
|
||||
|
||||
-- RTEMS Initialization not supported from Ada. Please write BSPs in C.
|
||||
|
||||
procedure Shutdown_Executive (
|
||||
Result : in RTEMS.Unsigned32
|
||||
) is
|
||||
procedure Shutdown_Executive_Base(
|
||||
Result : in RTEMS.Unsigned32
|
||||
);
|
||||
pragma Import (C,Shutdown_Executive_Base,"rtems_shutdown_executive");
|
||||
begin
|
||||
|
||||
Shutdown_Executive_Base( Result );
|
||||
|
||||
end Shutdown_Executive;
|
||||
|
||||
--
|
||||
-- Task Manager
|
||||
--
|
||||
@@ -256,7 +237,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Task_Create_Base, "rtems_task_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
Result := Task_Create_Base (
|
||||
Name,
|
||||
@@ -282,7 +263,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Task_Ident_Base, "rtems_task_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
|
||||
begin
|
||||
|
||||
@@ -379,7 +360,7 @@ package body RTEMS is
|
||||
Old_Priority : access RTEMS.Task_Priority
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Task_Set_Priority_Base, "rtems_task_set_priority");
|
||||
Old_Priority_Base : aliased RTEMS.Task_Priority;
|
||||
Old_Priority_Base : aliased RTEMS.Task_Priority := Old_Priority;
|
||||
begin
|
||||
|
||||
Result := Task_Set_Priority_Base (
|
||||
@@ -403,7 +384,7 @@ package body RTEMS is
|
||||
Previous_Mode_Set : access RTEMS.Mode
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Task_Mode_Base, "rtems_task_mode");
|
||||
Previous_Mode_Set_Base : aliased RTEMS.Mode;
|
||||
Previous_Mode_Set_Base : aliased RTEMS.Mode := Previous_Mode_Set;
|
||||
begin
|
||||
|
||||
Result := Task_Mode_Base (
|
||||
@@ -427,11 +408,11 @@ package body RTEMS is
|
||||
Note : access RTEMS.Unsigned32
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Task_Get_Note_Base, "rtems_task_get_note");
|
||||
Note_Base : aliased RTEMS.Unsigned32;
|
||||
Note_Base : aliased RTEMS.Unsigned32 := Note;
|
||||
begin
|
||||
|
||||
Result := Task_Get_Note_Base ( ID, Notepad, Note_Base'Unchecked_Access );
|
||||
Note := Note_Base;
|
||||
Note := NOTE_Base;
|
||||
|
||||
end Task_Get_Note;
|
||||
|
||||
@@ -453,41 +434,6 @@ package body RTEMS is
|
||||
|
||||
end Task_Set_Note;
|
||||
|
||||
procedure Task_Variable_Add (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : in RTEMS.Address;
|
||||
Dtor : in RTEMS.Task_Variable_Dtor;
|
||||
Result : out RTEMS.Status_Codes
|
||||
) is
|
||||
begin
|
||||
-- FIXME
|
||||
Result := Internal_Error;
|
||||
end Task_Variable_Add;
|
||||
|
||||
procedure Task_Variable_Get (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Task_Variable_Value : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
) is
|
||||
begin
|
||||
-- FIXME
|
||||
Task_Variable := RTEMS.Null_Address;
|
||||
Task_Variable_Value := RTEMS.Null_Address;
|
||||
Result := Internal_Error;
|
||||
end Task_Variable_Get;
|
||||
|
||||
procedure Task_Variable_Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
) is
|
||||
begin
|
||||
-- FIXME
|
||||
Task_Variable := RTEMS.Null_Address;
|
||||
Result := Internal_Error;
|
||||
end Task_Variable_Delete;
|
||||
|
||||
procedure Task_Wake_When (
|
||||
Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
Result : out RTEMS.Status_Codes
|
||||
@@ -532,13 +478,13 @@ package body RTEMS is
|
||||
Old_ISR_Handler : access RTEMS.Address
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Interrupt_Catch_Base, "rtems_interrupt_catch");
|
||||
Old_ISR_Handler_Base : aliased RTEMS.Address;
|
||||
Old_ISR_Handler_Base : aliased RTEMS.Address := Old_ISR_Handler;
|
||||
begin
|
||||
|
||||
Result := Interrupt_Catch_Base (
|
||||
New_ISR_Handler,
|
||||
Vector,
|
||||
Old_ISR_Handler_Base'Unchecked_Access
|
||||
OLD_ISR_HANDLER_Base'Unchecked_Access
|
||||
);
|
||||
Old_ISR_Handler := OLD_ISR_HANDLER_Base;
|
||||
|
||||
@@ -610,7 +556,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Extension_Create_Base, "rtems_extension_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Extension_Create_Base ( Name, Table, ID_Base'Unchecked_Access );
|
||||
@@ -628,7 +574,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Extension_Ident_Base, "rtems_extension_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Extension_Ident_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -664,7 +610,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Timer_Create_Base, "rtems_timer_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Timer_Create_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -682,7 +628,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Timer_Ident_Base, "rtems_timer_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Timer_Ident_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -864,7 +810,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Semaphore_Create_Base (
|
||||
@@ -904,7 +850,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Semaphore_Ident_Base, "rtems_semaphore_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Semaphore_Ident_Base ( Name, Node, ID_Base'Unchecked_Access );
|
||||
@@ -966,7 +912,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C,
|
||||
Message_Queue_Create_Base, "rtems_message_queue_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Message_Queue_Create_Base (
|
||||
@@ -992,7 +938,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Message_Queue_Ident_Base, "rtems_message_queue_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result :=
|
||||
@@ -1068,7 +1014,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Message_Queue_Broadcast_Base,
|
||||
"rtems_message_queue_broadcast");
|
||||
Count_Base : aliased RTEMS.Unsigned32;
|
||||
Count_Base : aliased RTEMS.Unsigned32 := Count;
|
||||
begin
|
||||
|
||||
Result := Message_Queue_Broadcast_Base (
|
||||
@@ -1122,7 +1068,7 @@ package body RTEMS is
|
||||
Count : access RTEMS.Unsigned32
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Message_Queue_Flush_Base, "rtems_message_queue_flush");
|
||||
COUNT_Base : aliased RTEMS.Unsigned32;
|
||||
COUNT_Base : aliased RTEMS.Unsigned32 := Count;
|
||||
begin
|
||||
|
||||
Result := Message_Queue_Flush_Base ( ID, COUNT_Base'Unchecked_Access );
|
||||
@@ -1164,7 +1110,7 @@ package body RTEMS is
|
||||
Event_Out : access RTEMS.Event_Set
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Event_Receive_Base, "rtems_event_receive");
|
||||
Event_Out_Base : aliased RTEMS.Event_Set;
|
||||
Event_Out_Base : aliased RTEMS.Event_Set; -- := Event_Out;
|
||||
begin
|
||||
|
||||
Result := Event_Receive_Base (
|
||||
@@ -1236,7 +1182,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.Event_Set
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Partition_Create_Base, "rtems_partition_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Partition_Create_Base (
|
||||
@@ -1263,7 +1209,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.Event_Set
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Partition_Ident_Base, "rtems_partition_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Partition_Ident_Base ( Name, Node, ID_Base'Unchecked_Access );
|
||||
@@ -1296,7 +1242,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Partition_Get_Buffer_Base,
|
||||
"rtems_partition_get_buffer");
|
||||
Buffer_Base : aliased RTEMS.Address;
|
||||
Buffer_Base : aliased RTEMS.Address := Buffer;
|
||||
begin
|
||||
|
||||
Result := Partition_Get_Buffer_Base ( ID, Buffer_Base'Unchecked_Access );
|
||||
@@ -1343,7 +1289,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Region_Create_Base, "rtems_region_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Region_Create_Base (
|
||||
@@ -1368,7 +1314,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Region_Ident_Base, "rtems_region_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Region_Ident_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -1424,7 +1370,7 @@ package body RTEMS is
|
||||
Segment : access RTEMS.Address
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Region_Get_Segment_Base, "rtems_region_get_segment");
|
||||
Segment_Base : aliased RTEMS.Address;
|
||||
Segment_Base : aliased RTEMS.Address := Segment;
|
||||
begin
|
||||
|
||||
Result := Region_Get_Segment_Base (
|
||||
@@ -1451,7 +1397,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Region_Get_Segment_Size_Base,
|
||||
"rtems_region_get_segment_size");
|
||||
Size_Base : aliased RTEMS.Unsigned32;
|
||||
Size_Base : aliased RTEMS.Unsigned32 := Size;
|
||||
begin
|
||||
|
||||
Result := Region_Get_Segment_Size_Base (
|
||||
@@ -1459,38 +1405,10 @@ package body RTEMS is
|
||||
Segment,
|
||||
Size_Base'Unchecked_Access
|
||||
);
|
||||
Size := Size_Base;
|
||||
Size := SIZE_Base;
|
||||
|
||||
end Region_Get_Segment_Size;
|
||||
|
||||
procedure Region_Resize_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Old_Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
) is
|
||||
function Region_Resize_Segment_Base (
|
||||
ID : RTEMS.ID;
|
||||
Segment : RTEMS.Address;
|
||||
Size : RTEMS.Unsigned32;
|
||||
Old_Size : access RTEMS.Unsigned32
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Region_Resize_Segment_Base,
|
||||
"rtems_region_get_segment_size");
|
||||
Old_Size_Base : aliased RTEMS.Unsigned32;
|
||||
begin
|
||||
|
||||
Result := Region_Resize_Segment_Base (
|
||||
ID,
|
||||
Segment,
|
||||
Size,
|
||||
Old_Size_Base'Unchecked_Access
|
||||
);
|
||||
Old_Size := Old_Size_Base;
|
||||
|
||||
end Region_Resize_Segment;
|
||||
|
||||
procedure Region_Return_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
@@ -1528,7 +1446,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Port_Create_Base, "rtems_port_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Port_Create_Base (
|
||||
@@ -1552,7 +1470,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Port_Ident_Base, "rtems_port_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Port_Ident_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -1587,7 +1505,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Port_External_To_Internal_Base,
|
||||
"rtems_port_external_to_internal");
|
||||
Internal_Base : aliased RTEMS.Address;
|
||||
Internal_Base : aliased RTEMS.Address := Internal;
|
||||
begin
|
||||
|
||||
Result := Port_External_To_Internal_Base (
|
||||
@@ -1612,7 +1530,7 @@ package body RTEMS is
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Port_Internal_To_External_Base,
|
||||
"rtems_port_internal_to_external");
|
||||
External_Base : aliased RTEMS.Address;
|
||||
External_Base : aliased RTEMS.Address := External;
|
||||
begin
|
||||
|
||||
Result := Port_Internal_To_External_Base (
|
||||
@@ -1628,24 +1546,6 @@ package body RTEMS is
|
||||
-- Input/Output Manager
|
||||
--
|
||||
|
||||
procedure IO_Initialize (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
) is
|
||||
function IO_Initialize_Base (
|
||||
Major : RTEMS.Device_Major_Number;
|
||||
Minor : RTEMS.Device_Minor_Number;
|
||||
Argument : RTEMS.Address
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, IO_Initialize_Base, "rtems_io_initialize");
|
||||
begin
|
||||
|
||||
Result := IO_Initialize_Base ( Major, Minor, Argument );
|
||||
|
||||
end IO_Initialize;
|
||||
|
||||
procedure IO_Register_Name (
|
||||
Name : in String;
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
@@ -1808,7 +1708,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Rate_Monotonic_Create_base, "rtems_rate_monotonic_create");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Rate_Monotonic_Create_base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -1826,7 +1726,7 @@ package body RTEMS is
|
||||
ID : access RTEMS.ID
|
||||
) return RTEMS.Status_Codes;
|
||||
pragma Import (C, Rate_Monotonic_Ident_Base, "rtems_rate_monotonic_ident");
|
||||
ID_Base : aliased RTEMS.ID;
|
||||
ID_Base : aliased RTEMS.ID := ID;
|
||||
begin
|
||||
|
||||
Result := Rate_Monotonic_Ident_Base ( Name, ID_Base'Unchecked_Access );
|
||||
@@ -1952,13 +1852,4 @@ package body RTEMS is
|
||||
|
||||
end Debug_Is_Enabled;
|
||||
|
||||
-- HACK
|
||||
-- function Configuration
|
||||
-- return RTEMS.Configuration_Table_Pointer is
|
||||
-- Configuration_base : RTEMS.Configuration_Table_Pointer;
|
||||
-- pragma Import (C, Configuration_base, "_Configuration_Table");
|
||||
-- begin
|
||||
-- return Configuration_Base;
|
||||
-- end Configuration;
|
||||
|
||||
end RTEMS;
|
||||
|
||||
@@ -7,16 +7,18 @@
|
||||
--
|
||||
-- DEPENDENCIES:
|
||||
--
|
||||
-- NOTES:
|
||||
-- RTEMS initialization and configuration are called from
|
||||
-- the BSP side, therefore should never be called from ADA.
|
||||
--
|
||||
--
|
||||
-- COPYRIGHT (c) 1997.
|
||||
-- COPYRIGHT (c) 1997-2007.
|
||||
-- On-Line Applications Research Corporation (OAR).
|
||||
--
|
||||
-- The license and distribution terms for this file may in
|
||||
-- the file LICENSE in this distribution or at
|
||||
-- http://www.rtems.com/license/LICENSE.
|
||||
--
|
||||
-- $Id$
|
||||
-- rtems.ads,v 1.19.2.2 2003/11/25 14:07:32 joel Exp
|
||||
--
|
||||
|
||||
with System;
|
||||
@@ -182,7 +184,10 @@ pragma Elaborate_Body (RTEMS);
|
||||
-- Ident Options
|
||||
--
|
||||
|
||||
Search_All_Nodes : constant RTEMS.Node := 0;
|
||||
Search_All_Nodes : constant RTEMS.Node := 0;
|
||||
Search_Other_Nodes : constant RTEMS.Node := 16#7FFFFFFE#;
|
||||
Search_Local_Node : constant RTEMS.Node := 16#7FFFFFFF#;
|
||||
Who_Am_I : constant RTEMS.Node := 0;
|
||||
|
||||
--
|
||||
-- Options
|
||||
@@ -221,19 +226,20 @@ pragma Elaborate_Body (RTEMS);
|
||||
-- Attribute constants
|
||||
--
|
||||
|
||||
Default_Attributes : constant RTEMS.Attribute := 16#00000000#;
|
||||
No_Floating_Point : constant RTEMS.Attribute := 16#00000000#;
|
||||
Floating_Point : constant RTEMS.Attribute := 16#00000001#;
|
||||
Local : constant RTEMS.Attribute := 16#00000000#;
|
||||
Global : constant RTEMS.Attribute := 16#00000002#;
|
||||
FIFO : constant RTEMS.Attribute := 16#00000000#;
|
||||
Priority : constant RTEMS.Attribute := 16#00000004#;
|
||||
Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#;
|
||||
Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#;
|
||||
No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#;
|
||||
Inherit_Priority : constant RTEMS.Attribute := 16#00000020#;
|
||||
No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#;
|
||||
Priority_Ceiling : constant RTEMS.Attribute := 16#00000040#;
|
||||
Default_Attributes : constant RTEMS.Attribute := 16#00000000#;
|
||||
No_Floating_Point : constant RTEMS.Attribute := 16#00000000#;
|
||||
Floating_Point : constant RTEMS.Attribute := 16#00000001#;
|
||||
Local : constant RTEMS.Attribute := 16#00000000#;
|
||||
Global : constant RTEMS.Attribute := 16#00000002#;
|
||||
FIFO : constant RTEMS.Attribute := 16#00000000#;
|
||||
Priority : constant RTEMS.Attribute := 16#00000004#;
|
||||
Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#;
|
||||
Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#;
|
||||
Simple_Binary_Semaphore : constant RTEMS.Attribute := 16#00000020#;
|
||||
No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#;
|
||||
Inherit_Priority : constant RTEMS.Attribute := 16#00000040#;
|
||||
No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#;
|
||||
Priority_Ceiling : constant RTEMS.Attribute := 16#00000080#;
|
||||
|
||||
function Interrupt_Level (
|
||||
Level : in RTEMS.Unsigned32
|
||||
@@ -532,194 +538,6 @@ pragma Elaborate_Body (RTEMS);
|
||||
Signal_30 : constant RTEMS.Signal_Set := 16#40000000#;
|
||||
Signal_31 : constant RTEMS.Signal_Set := 16#80000000#;
|
||||
|
||||
--
|
||||
-- RTEMS API Configuration Information
|
||||
--
|
||||
|
||||
type Initialization_Tasks_Table_Entry is
|
||||
record
|
||||
Name : RTEMS.Name; -- task name
|
||||
Stack_Size : RTEMS.Unsigned32; -- task stack size
|
||||
Initial_Priority : RTEMS.Task_priority; -- task priority
|
||||
Attribute_Set : RTEMS.Attribute; -- task attributes
|
||||
Entry_Point : RTEMS.Task_Entry; -- task entry point
|
||||
Mode_Set : RTEMS.Mode; -- task initial mode
|
||||
Argument : RTEMS.Unsigned32; -- task argument
|
||||
end record;
|
||||
|
||||
type Initialization_Tasks_Table is array ( RTEMS.Unsigned32 range <> ) of
|
||||
RTEMS.Initialization_Tasks_Table_Entry;
|
||||
|
||||
type Initialization_Tasks_Table_Pointer is access all
|
||||
Initialization_Tasks_Table;
|
||||
|
||||
type API_Configuration_Table is
|
||||
record
|
||||
Maximum_Tasks : RTEMS.Unsigned32;
|
||||
Maximum_Timers : RTEMS.Unsigned32;
|
||||
Maximum_Semaphores : RTEMS.Unsigned32;
|
||||
Maximum_Message_queues : RTEMS.Unsigned32;
|
||||
Maximum_Partitions : RTEMS.Unsigned32;
|
||||
Maximum_Regions : RTEMS.Unsigned32;
|
||||
Maximum_Ports : RTEMS.Unsigned32;
|
||||
Maximum_Periods : RTEMS.Unsigned32;
|
||||
Number_Of_Initialization_Tasks : RTEMS.Unsigned32;
|
||||
User_Initialization_Tasks_Table :
|
||||
RTEMS.Initialization_Tasks_Table_Pointer;
|
||||
end record;
|
||||
|
||||
type API_Configuration_Table_Pointer is access all API_Configuration_Table;
|
||||
|
||||
--
|
||||
-- RTEMS POSIX API Configuration Information
|
||||
--
|
||||
|
||||
type POSIX_Thread_Entry is access procedure (
|
||||
Argument : in RTEMS.Address
|
||||
);
|
||||
|
||||
type POSIX_Initialization_Threads_Table_Entry is
|
||||
record
|
||||
Thread_Entry : RTEMS.POSIX_Thread_Entry;
|
||||
end record;
|
||||
|
||||
type POSIX_Initialization_Threads_Table is array
|
||||
( RTEMS.Unsigned32 range <> ) of
|
||||
RTEMS.POSIX_Initialization_Threads_Table_Entry;
|
||||
|
||||
type POSIX_Initialization_Threads_Table_Pointer is access all
|
||||
POSIX_Initialization_Threads_Table;
|
||||
|
||||
type POSIX_API_Configuration_Table_Entry is
|
||||
record
|
||||
Maximum_Threads : Interfaces.C.Int;
|
||||
Maximum_Mutexes : Interfaces.C.Int;
|
||||
Maximum_Condition_Variables : Interfaces.C.Int;
|
||||
Maximum_Keys : Interfaces.C.Int;
|
||||
Maximum_Queued_Signals : Interfaces.C.Int;
|
||||
Number_Of_Initialization_Tasks : Interfaces.C.Int;
|
||||
User_Initialization_Tasks_Table :
|
||||
RTEMS.POSIX_Initialization_Threads_Table_Pointer;
|
||||
end record;
|
||||
|
||||
type POSIX_API_Configuration_Table is array ( RTEMS.Unsigned32 range <> ) of
|
||||
RTEMS.POSIX_API_Configuration_Table_Entry;
|
||||
|
||||
type POSIX_API_Configuration_Table_Pointer is access all
|
||||
RTEMS.POSIX_API_Configuration_Table;
|
||||
|
||||
--
|
||||
-- MPCI Information include MPCI Configuration
|
||||
--
|
||||
|
||||
type Configuration_Table_Pointer;
|
||||
|
||||
type MP_Packet_Classes is (
|
||||
MP_PACKET_MPCI_INTERNAL,
|
||||
MP_PACKET_TASKS,
|
||||
MP_PACKET_MESSAGE_QUEUE,
|
||||
MP_PACKET_SEMAPHORE,
|
||||
MP_PACKET_PARTITION,
|
||||
MP_PACKET_REGION,
|
||||
MP_PACKET_EVENT,
|
||||
MP_PACKET_SIGNAL
|
||||
);
|
||||
|
||||
for MP_Packet_Classes use (
|
||||
MP_PACKET_MPCI_INTERNAL => 0,
|
||||
MP_PACKET_TASKS => 1,
|
||||
MP_PACKET_MESSAGE_QUEUE => 2,
|
||||
MP_PACKET_SEMAPHORE => 3,
|
||||
MP_PACKET_PARTITION => 4,
|
||||
MP_PACKET_REGION => 5,
|
||||
MP_PACKET_EVENT => 6,
|
||||
MP_PACKET_SIGNAL => 7
|
||||
);
|
||||
|
||||
type Packet_Prefix is
|
||||
record
|
||||
The_Class : RTEMS.MP_Packet_Classes;
|
||||
ID : RTEMS.ID;
|
||||
Source_TID : RTEMS.ID;
|
||||
Source_Priority : RTEMS.Task_Priority;
|
||||
Return_Code : RTEMS.Unsigned32;
|
||||
Length : RTEMS.Unsigned32;
|
||||
To_Convert : RTEMS.Unsigned32;
|
||||
Timeout : RTEMS.Interval;
|
||||
end record;
|
||||
|
||||
type Packet_Prefix_Pointer is access all Packet_Prefix;
|
||||
|
||||
type MPCI_Initialization_Entry is access procedure (
|
||||
Configuration : in RTEMS.Configuration_Table_Pointer
|
||||
);
|
||||
|
||||
type MPCI_Get_Packet_Entry is access procedure (
|
||||
Packet : access RTEMS.Packet_Prefix_Pointer
|
||||
);
|
||||
|
||||
type MPCI_Return_Packet_Entry is access procedure (
|
||||
Packet : in RTEMS.Packet_Prefix_Pointer
|
||||
);
|
||||
|
||||
type MPCI_Send_Entry is access procedure (
|
||||
Packet : in RTEMS.Packet_Prefix_Pointer
|
||||
);
|
||||
|
||||
type MPCI_Receive_Entry is access procedure (
|
||||
Packet : access RTEMS.Packet_Prefix_Pointer
|
||||
);
|
||||
|
||||
type MPCI_Table is
|
||||
record
|
||||
Default_Timeout : RTEMS.Unsigned32; -- in ticks
|
||||
Maximum_Packet_Size : RTEMS.Unsigned32;
|
||||
Initialization : RTEMS.MPCI_Initialization_Entry;
|
||||
Get_Packet : RTEMS.MPCI_Get_Packet_Entry;
|
||||
Return_Packet : RTEMS.MPCI_Return_Packet_Entry;
|
||||
Send : RTEMS.MPCI_Send_Entry;
|
||||
Receive : RTEMS.MPCI_Receive_Entry;
|
||||
end record;
|
||||
|
||||
type MPCI_Table_Pointer is access all MPCI_Table;
|
||||
|
||||
--
|
||||
-- Configuration Information
|
||||
--
|
||||
|
||||
type Multiprocessing_Table is
|
||||
record
|
||||
Node : RTEMS.Unsigned32;
|
||||
Maximum_Nodes : RTEMS.Unsigned32;
|
||||
Maximum_Global_Objects : RTEMS.Unsigned32;
|
||||
Maximum_Proxies : RTEMS.Unsigned32;
|
||||
User_MPCI_Table : RTEMS.MPCI_Table_Pointer;
|
||||
end record;
|
||||
|
||||
type Multiprocessing_Table_Pointer is access all Multiprocessing_Table;
|
||||
|
||||
type Configuration_Table is
|
||||
record
|
||||
Work_Space_Start : RTEMS.Address;
|
||||
Work_Space_Size : RTEMS.Unsigned32;
|
||||
Maximum_Extensions : RTEMS.Unsigned32;
|
||||
Microseconds_Per_Tick : RTEMS.Unsigned32;
|
||||
Ticks_Per_Timeslice : RTEMS.Unsigned32;
|
||||
Maximum_Devices : RTEMS.Unsigned32;
|
||||
Maximum_Drivers : RTEMS.Unsigned32;
|
||||
Number_Of_Device_Drivers : RTEMS.Unsigned32;
|
||||
Device_Driver_Table : RTEMS.Driver_Address_Table_Pointer;
|
||||
Number_Of_Initial_Extensions : RTEMS.Unsigned32;
|
||||
User_Extension_Table : RTEMS.Extensions_Table_Pointer;
|
||||
User_Multiprocessing_Table : RTEMS.Multiprocessing_Table_Pointer;
|
||||
|
||||
RTEMS_API_Configuration : RTEMS.API_Configuration_Table_Pointer;
|
||||
POSIX_API_Configuration : RTEMS.POSIX_API_Configuration_Table_Pointer;
|
||||
ITRON_API_Configuration : RTEMS.Address; -- XXX FIX ME
|
||||
end record;
|
||||
|
||||
type Configuration_Table_Pointer is access all Configuration_Table;
|
||||
|
||||
--
|
||||
-- For now, do not provide access to the CPU Table from Ada.
|
||||
-- When this type is provided, a CPU dependent file must
|
||||
@@ -798,16 +616,6 @@ pragma Elaborate_Body (RTEMS);
|
||||
-- RTEMS API
|
||||
--
|
||||
|
||||
--
|
||||
-- Initialization Manager
|
||||
--
|
||||
|
||||
-- RTEMS Initialization not supported from Ada. Please write BSPs in C.
|
||||
|
||||
procedure Shutdown_Executive (
|
||||
Result : in RTEMS.Unsigned32
|
||||
);
|
||||
|
||||
--
|
||||
-- Task Manager
|
||||
--
|
||||
@@ -889,25 +697,25 @@ pragma Elaborate_Body (RTEMS);
|
||||
Argument : in RTEMS.Address
|
||||
);
|
||||
|
||||
procedure Task_Variable_Add (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : in RTEMS.Address;
|
||||
Dtor : in RTEMS.Task_Variable_Dtor;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
-- procedure Task_Variable_Add (
|
||||
-- ID : in RTEMS.ID;
|
||||
-- Task_Variable : in RTEMS.Address;
|
||||
-- Dtor : in RTEMS.Task_Variable_Dtor;
|
||||
-- Result : out RTEMS.Status_Codes
|
||||
-- );
|
||||
|
||||
procedure Task_Variable_Get (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Task_Variable_Value : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
-- procedure Task_Variable_Get (
|
||||
-- ID : in RTEMS.ID;
|
||||
-- Task_Variable : out RTEMS.Address;
|
||||
-- Task_Variable_Value : out RTEMS.Address;
|
||||
-- Result : out RTEMS.Status_Codes
|
||||
-- );
|
||||
|
||||
procedure Task_Variable_Delete (
|
||||
ID : in RTEMS.ID;
|
||||
Task_Variable : out RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
-- procedure Task_Variable_Delete (
|
||||
-- ID : in RTEMS.ID;
|
||||
-- Task_Variable : out RTEMS.Address;
|
||||
-- Result : out RTEMS.Status_Codes
|
||||
-- );
|
||||
|
||||
procedure Task_Wake_When (
|
||||
Time_Buffer : in RTEMS.Time_Of_Day;
|
||||
@@ -1286,14 +1094,6 @@ pragma Elaborate_Body (RTEMS);
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Region_Resize_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
Size : in RTEMS.Unsigned32;
|
||||
Old_Size : out RTEMS.Unsigned32;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure Region_Return_Segment (
|
||||
ID : in RTEMS.ID;
|
||||
Segment : in RTEMS.Address;
|
||||
@@ -1343,13 +1143,6 @@ pragma Elaborate_Body (RTEMS);
|
||||
-- Input/Output Manager
|
||||
--
|
||||
|
||||
procedure IO_Initialize (
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
Minor : in RTEMS.Device_Minor_Number;
|
||||
Argument : in RTEMS.Address;
|
||||
Result : out RTEMS.Status_Codes
|
||||
);
|
||||
|
||||
procedure IO_Register_Name (
|
||||
Name : in String;
|
||||
Major : in RTEMS.Device_Major_Number;
|
||||
@@ -1466,11 +1259,4 @@ pragma Elaborate_Body (RTEMS);
|
||||
Level : in RTEMS.Debug_Set
|
||||
) return RTEMS.Boolean;
|
||||
|
||||
--
|
||||
-- Some Useful Data Items
|
||||
--
|
||||
|
||||
Configuration : RTEMS.Configuration_Table_Pointer;
|
||||
pragma Import (C, Configuration, "_Configuration_Table");
|
||||
|
||||
end RTEMS;
|
||||
|
||||
Reference in New Issue
Block a user