summaryrefslogtreecommitdiffstats
path: root/c/src/ada/rtems.adb
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-06-03 15:11:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-06-03 15:11:39 +0000
commitd348ad96d59f7a4bb3941745445f119d83eac7e8 (patch)
treec044a54be02b463473028aeebf7eff0bed2b9a9f /c/src/ada/rtems.adb
parentchanged reference for Configuration Table from BSP to RTEMS. (diff)
downloadrtems-d348ad96d59f7a4bb3941745445f119d83eac7e8.tar.bz2
added more constants and fixed numer
Diffstat (limited to 'c/src/ada/rtems.adb')
-rw-r--r--c/src/ada/rtems.adb56
1 files changed, 40 insertions, 16 deletions
diff --git a/c/src/ada/rtems.adb b/c/src/ada/rtems.adb
index e7d8f35c39..18bb63f7d1 100644
--- a/c/src/ada/rtems.adb
+++ b/c/src/ada/rtems.adb
@@ -9,11 +9,18 @@
--
--
--
--- COPYRIGHT (c) 1989 - 1997.
+-- COPYRIGHT (c) 1997.
-- 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.OARcorp.com/rtems/license.html.
+--
+-- $Id$
+--
with Ada;
+with Ada.Unchecked_Conversion;
with System;
with Interfaces; use Interfaces;
with Interfaces.C;
@@ -171,6 +178,17 @@ package body RTEMS is
end Is_Status_Successful;
+ function Subtract (
+ Left : in RTEMS.Address;
+ Right : in RTEMS.Address
+ ) return RTEMS.Unsigned32 is
+ function To_Unsigned32 is
+ new Ada.Unchecked_Conversion (System.Address, RTEMS.Unsigned32);
+
+ begin
+ return To_Unsigned32(Left) - To_Unsigned32(Right);
+ end Subtract;
+
--
--
-- RTEMS API
@@ -822,17 +840,19 @@ package body RTEMS is
--
procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
+ Name : in RTEMS.Name;
+ Count : in RTEMS.Unsigned32;
+ Attribute_Set : in RTEMS.Attribute;
+ Priority_Ceiling : in RTEMS.Task_Priority;
+ ID : out RTEMS.ID;
+ Result : out RTEMS.Status_Codes
) is
function Semaphore_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
+ Name : RTEMS.Name;
+ Count : RTEMS.Unsigned32;
+ Attribute_Set : RTEMS.Attribute;
+ Priority_Ceiling : RTEMS.Task_Priority;
+ ID : access RTEMS.ID
) return RTEMS.Status_Codes;
pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
ID_Base : aliased RTEMS.ID := ID;
@@ -842,6 +862,7 @@ package body RTEMS is
Name,
Count,
Attribute_Set,
+ Priority_Ceiling,
ID_Base'Unchecked_Access
);
@@ -934,10 +955,11 @@ package body RTEMS is
) is
-- XXX broken
function Message_Queue_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
+ Name : RTEMS.Name;
+ Count : RTEMS.Unsigned32;
+ Max_Message_Size : RTEMS.Unsigned32;
+ Attribute_Set : RTEMS.Attribute;
+ ID : access RTEMS.ID
) return RTEMS.Status_Codes;
pragma Import (C,
Message_Queue_Create_Base, "rtems_message_queue_create");
@@ -947,6 +969,7 @@ package body RTEMS is
Result := Message_Queue_Create_Base (
Name,
Count,
+ Max_Message_Size,
Attribute_Set,
ID_Base'Unchecked_Access
);
@@ -1931,13 +1954,14 @@ package body RTEMS is
Result : out RTEMS.Status_Codes
) is
function Rate_Monotonic_Period_Base (
- ID : RTEMS.ID
+ ID : RTEMS.ID;
+ Length : RTEMS.Interval
) return RTEMS.Status_Codes;
pragma Import (C, Rate_Monotonic_Period_Base,
"rtems_rate_monotonic_period");
begin
- Result := Rate_Monotonic_Period_base ( ID );
+ Result := Rate_Monotonic_Period_base ( ID, Length );
end Rate_Monotonic_Period;