summaryrefslogtreecommitdiffstats
path: root/c/src/ada/rtems.ads
diff options
context:
space:
mode:
authorGlenn Humphrey <glenn.humphrey@oarcorp.com>2007-10-26 21:37:07 +0000
committerGlenn Humphrey <glenn.humphrey@oarcorp.com>2007-10-26 21:37:07 +0000
commit8294a5d9f660865776742c5f9f418bab7a99170b (patch)
treeecc0a489e7cc4aab9eba217a4420e77ca0d9eed6 /c/src/ada/rtems.ads
parent2007-10-26 Glenn Humphrey <glenn.humphrey@OARcorp.com> (diff)
downloadrtems-8294a5d9f660865776742c5f9f418bab7a99170b.tar.bz2
2007-10-26 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* rtems.adb, rtems.ads: Merge binding updates from CVS head. Bindings should now be reasonably in sync with C Classic API.
Diffstat (limited to '')
-rw-r--r--c/src/ada/rtems.ads291
1 files changed, 149 insertions, 142 deletions
diff --git a/c/src/ada/rtems.ads b/c/src/ada/rtems.ads
index 9bff212fef..52ef71456d 100644
--- a/c/src/ada/rtems.ads
+++ b/c/src/ada/rtems.ads
@@ -18,7 +18,7 @@
-- the file LICENSE in this distribution or at
-- http://www.rtems.com/license/LICENSE.
--
--- rtems.ads,v 1.19.2.2 2003/11/25 14:07:32 joel Exp
+-- $Id$
--
with System;
@@ -77,6 +77,7 @@ pragma Elaborate_Body (RTEMS);
True : constant RTEMS.Boolean := 1;
False : constant RTEMS.Boolean := 0;
+ --
-- More Types
--
@@ -94,27 +95,24 @@ pragma Elaborate_Body (RTEMS);
subtype Debug_Set is RTEMS.Unsigned32;
subtype Device_Major_Number is RTEMS.Unsigned32;
subtype Device_Minor_Number is RTEMS.Unsigned32;
- subtype Vector_Number is RTEMS.Unsigned32;
subtype ISR_Level is RTEMS.Unsigned32;
subtype Node is RTEMS.Unsigned32;
--
-- Task Related Types
- -- XXXX fix this
+ --
+
subtype Task_Argument is RTEMS.Unsigned32;
type Task_Argument_PTR is access all Task_Argument;
- -- XXXX fix this
- subtype TCB is RTEMS.Unsigned32;
- type TCB_Pointer is access all RTEMS.TCB;
-
- subtype Task_States is RTEMS.Unsigned32;
-
type Task_Entry is access procedure (
Argument : RTEMS.Unsigned32
);
+ subtype TCB is RTEMS.Unsigned32;
+ type TCB_Pointer is access all RTEMS.TCB;
+
--
-- Clock and Time of Day Types
--
@@ -140,45 +138,17 @@ pragma Elaborate_Body (RTEMS);
Clock_Get_TOD,
Clock_Get_Seconds_Since_Epoch,
Clock_Get_Ticks_Since_Boot,
- Clock_Get_Ticks_Per_Seconds,
+ Clock_Get_Ticks_Per_Second,
Clock_Get_Time_Value
);
- --
- -- Device Driver Entry Prototype
- --
-
- type Device_Driver_Entry is access function (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Major_Number;
- Argument : in RTEMS.Unsigned32;
- ID : in RTEMS.Unsigned32
- ) return RTEMS.Unsigned32;
-
- type Driver_Address_Table_Entry is
- record
- Initialization : RTEMS.Device_Driver_Entry;
- Open : RTEMS.Device_Driver_Entry;
- Close : RTEMS.Device_Driver_Entry;
- Read : RTEMS.Device_Driver_Entry;
- Write : RTEMS.Device_Driver_Entry;
- Control : RTEMS.Device_Driver_Entry;
- end record;
-
- type Driver_Address_Table is array ( RTEMS.Unsigned32
- range 1 .. RTEMS.Unsigned32'Last ) of RTEMS.Driver_Address_Table_Entry;
+ type Time_T is new Interfaces.C.Long;
- type Driver_Address_Table_Pointer is access all Driver_Address_Table;
-
- type Driver_Name_t is
- record
- Device_Name : RTEMS.Address;
- Device_Name_Length : RTEMS.Unsigned32;
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- end record;
-
- type Driver_Name_t_Pointer is access all Driver_Name_t;
+ type Timespec is record
+ TV_Sec : Time_T;
+ TV_Nsec : Interfaces.C.Long;
+ end record;
+ pragma Convention (C, Timespec);
--
-- Ident Options
@@ -249,7 +219,6 @@ pragma Elaborate_Body (RTEMS);
Minimum_Stack_Size : RTEMS.Unsigned32;
pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size");
-
--
-- Notepad index constants
--
@@ -282,15 +251,14 @@ pragma Elaborate_Body (RTEMS);
Current_Priority : constant RTEMS.Task_Priority := 0;
No_Priority : constant RTEMS.Task_Priority := 0;
-
--
-- Extension Callouts and Table
--
- type Thread_Create_Extension is access procedure (
+ type Thread_Create_Extension is access function (
Current_Task : in RTEMS.TCB_Pointer;
New_Task : in RTEMS.TCB_Pointer
- );
+ ) return RTEMS.Boolean;
type Thread_Start_Extension is access procedure (
Current_Task : in RTEMS.TCB_Pointer;
@@ -539,15 +507,6 @@ pragma Elaborate_Body (RTEMS);
Signal_31 : constant RTEMS.Signal_Set := 16#80000000#;
--
- -- For now, do not provide access to the CPU Table from Ada.
- -- When this type is provided, a CPU dependent file must
- -- define it.
- --
-
- subtype CPU_Table is RTEMS.Address;
- type CPU_Table_Pointer is access all CPU_Table;
-
- --
-- Utility Functions
--
@@ -612,11 +571,20 @@ pragma Elaborate_Body (RTEMS);
Left : in RTEMS.Address;
Right : in RTEMS.Address
) return Standard.Boolean;
+
+
--
-- RTEMS API
--
--
+ -- Initialization Manager -- Shutdown Only
+ --
+ procedure Shutdown_Executive (
+ Status : in RTEMS.Unsigned32
+ );
+
+ --
-- Task Manager
--
@@ -665,6 +633,11 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
+ procedure Task_Is_Suspended (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
procedure Task_Set_Priority (
ID : in RTEMS.ID;
New_Priority : in RTEMS.Task_Priority;
@@ -697,25 +670,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;
@@ -731,13 +704,6 @@ pragma Elaborate_Body (RTEMS);
-- Interrupt Manager
--
- procedure Interrupt_Catch (
- New_ISR_Handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
function Interrupt_Disable return RTEMS.ISR_Level;
pragma Interface (C, Interrupt_Disable);
pragma Interface_Name (Interrupt_Disable, "rtems_interrupt_disable");
@@ -763,15 +729,20 @@ pragma Elaborate_Body (RTEMS);
-- Clock Manager
--
+ procedure Clock_Set (
+ Time_Buffer : in RTEMS.Time_Of_Day;
+ Result : out RTEMS.Status_Codes
+ );
+
procedure Clock_Get (
Option : in RTEMS.Clock_Get_Options;
Time_Buffer : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
- procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
+ procedure Clock_Get_Uptime (
+ Uptime : out RTEMS.Timespec;
+ Result : out RTEMS.Status_Codes
);
procedure Clock_Tick (
@@ -800,7 +771,6 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
-
--
-- Timer Manager
--
@@ -908,6 +878,10 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
+ procedure Semaphore_Flush (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
--
-- Message Queue Manager
@@ -965,12 +939,17 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
- procedure Message_Queue_Flush (
+ procedure Message_Queue_Get_Number_Pending (
ID : in RTEMS.ID;
Count : out RTEMS.Unsigned32;
Result : out RTEMS.Status_Codes
);
+ procedure Message_Queue_Flush (
+ ID : in RTEMS.ID;
+ Count : out RTEMS.Unsigned32;
+ Result : out RTEMS.Status_Codes
+ );
--
-- Event Manager
@@ -1006,7 +985,6 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
-
--
-- Partition Manager
--
@@ -1045,7 +1023,6 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
-
--
-- Region Manager
--
@@ -1100,6 +1077,13 @@ 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
+ );
--
-- Dual Ported Memory Manager
@@ -1140,59 +1124,6 @@ pragma Elaborate_Body (RTEMS);
);
--
- -- Input/Output Manager
- --
-
- procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : In RTEMS.Driver_Name_t_Pointer;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
-- Fatal Error Manager
--
@@ -1200,7 +1131,6 @@ pragma Elaborate_Body (RTEMS);
The_Error : in RTEMS.Unsigned32
);
-
--
-- Rate Monotonic Manager
--
@@ -1239,6 +1169,83 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
+ procedure Rate_Monotonic_Reset_Statistics (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
+ procedure Rate_Monotonic_Reset_All_Statistics;
+ pragma Import (
+ C,
+ Rate_Monotonic_Reset_All_Statistics,
+ "rtems_rate_monotonic_reset_all_statistics"
+ );
+
+ procedure Rate_Monotonic_Report_Statistics;
+ pragma Import (
+ C,
+ Rate_Monotonic_Report_Statistics,
+ "rtems_rate_monotonic_report_statistics"
+ );
+
+ --
+ -- Barrier Manager
+ --
+
+ procedure Barrier_Create (
+ Name : in RTEMS.Name;
+ Attribute_Set : in RTEMS.Attribute;
+ Maximum_Waiters : in RTEMS.Unsigned32;
+ ID : out RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
+ procedure Barrier_Ident (
+ Name : in RTEMS.Name;
+ ID : out RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
+ procedure Barrier_Delete (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
+ procedure Barrier_Wait (
+ ID : in RTEMS.ID;
+ Option_Set : in RTEMS.Option;
+ Timeout : in RTEMS.Interval;
+ Result : out RTEMS.Status_Codes
+ );
+
+ procedure Barrier_Release (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+ );
+
+ --
+ -- Stack Bounds Checker
+ --
+
+ function Stack_Checker_Is_Blown return RTEMS.Boolean;
+ pragma Interface (C, Stack_Checker_Is_Blown);
+ pragma Interface_Name
+ (Interrupt_Is_In_Progress, "rtems_stack_checker_is_blown");
+
+ procedure Stack_Checker_Report_Usage;
+ pragma Import (
+ C, Stack_Checker_Report_Usage, "rtems_stack_checker_report_usage"
+ );
+
+ --
+ -- CPU Usage Statistics
+ --
+
+ procedure CPU_Usage_Report;
+ pragma Import (C, CPU_Usage_Report, "rtems_cpu_usage_report");
+
+ procedure CPU_Usage_Reset;
+ pragma Import (C, CPU_Usage_Reset, "rtems_cpu_usage_reset");
--
-- Debug Manager