added more constants and fixed numer

This commit is contained in:
Joel Sherrill
1997-06-03 15:11:39 +00:00
parent 7d366f1c98
commit d348ad96d5
4 changed files with 128 additions and 48 deletions

View File

@@ -9,11 +9,18 @@
-- --
-- --
-- --
-- COPYRIGHT (c) 1989 - 1997. -- COPYRIGHT (c) 1997.
-- On-Line Applications Research Corporation (OAR). -- 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;
with Ada.Unchecked_Conversion;
with System; with System;
with Interfaces; use Interfaces; with Interfaces; use Interfaces;
with Interfaces.C; with Interfaces.C;
@@ -171,6 +178,17 @@ package body RTEMS is
end Is_Status_Successful; 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 -- RTEMS API
@@ -822,17 +840,19 @@ package body RTEMS is
-- --
procedure Semaphore_Create ( procedure Semaphore_Create (
Name : in RTEMS.Name; Name : in RTEMS.Name;
Count : in RTEMS.Unsigned32; Count : in RTEMS.Unsigned32;
Attribute_Set : in RTEMS.Attribute; Attribute_Set : in RTEMS.Attribute;
ID : out RTEMS.ID; Priority_Ceiling : in RTEMS.Task_Priority;
Result : out RTEMS.Status_Codes ID : out RTEMS.ID;
Result : out RTEMS.Status_Codes
) is ) is
function Semaphore_Create_Base ( function Semaphore_Create_Base (
Name : RTEMS.Name; Name : RTEMS.Name;
Count : RTEMS.Unsigned32; Count : RTEMS.Unsigned32;
Attribute_Set : RTEMS.Attribute; Attribute_Set : RTEMS.Attribute;
ID : access RTEMS.ID Priority_Ceiling : RTEMS.Task_Priority;
ID : access RTEMS.ID
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create"); pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
ID_Base : aliased RTEMS.ID := ID; ID_Base : aliased RTEMS.ID := ID;
@@ -842,6 +862,7 @@ package body RTEMS is
Name, Name,
Count, Count,
Attribute_Set, Attribute_Set,
Priority_Ceiling,
ID_Base'Unchecked_Access ID_Base'Unchecked_Access
); );
@@ -934,10 +955,11 @@ package body RTEMS is
) is ) is
-- XXX broken -- XXX broken
function Message_Queue_Create_Base ( function Message_Queue_Create_Base (
Name : RTEMS.Name; Name : RTEMS.Name;
Count : RTEMS.Unsigned32; Count : RTEMS.Unsigned32;
Attribute_Set : RTEMS.Attribute; Max_Message_Size : RTEMS.Unsigned32;
ID : access RTEMS.ID Attribute_Set : RTEMS.Attribute;
ID : access RTEMS.ID
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, pragma Import (C,
Message_Queue_Create_Base, "rtems_message_queue_create"); Message_Queue_Create_Base, "rtems_message_queue_create");
@@ -947,6 +969,7 @@ package body RTEMS is
Result := Message_Queue_Create_Base ( Result := Message_Queue_Create_Base (
Name, Name,
Count, Count,
Max_Message_Size,
Attribute_Set, Attribute_Set,
ID_Base'Unchecked_Access ID_Base'Unchecked_Access
); );
@@ -1931,13 +1954,14 @@ package body RTEMS is
Result : out RTEMS.Status_Codes Result : out RTEMS.Status_Codes
) is ) is
function Rate_Monotonic_Period_Base ( function Rate_Monotonic_Period_Base (
ID : RTEMS.ID ID : RTEMS.ID;
Length : RTEMS.Interval
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, Rate_Monotonic_Period_Base, pragma Import (C, Rate_Monotonic_Period_Base,
"rtems_rate_monotonic_period"); "rtems_rate_monotonic_period");
begin begin
Result := Rate_Monotonic_Period_base ( ID ); Result := Rate_Monotonic_Period_base ( ID, Length );
end Rate_Monotonic_Period; end Rate_Monotonic_Period;

View File

@@ -9,9 +9,15 @@
-- --
-- --
-- --
-- COPYRIGHT (c) 1989 - 1997. -- COPYRIGHT (c) 1997.
-- On-Line Applications Research Corporation (OAR). -- 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 System; with System;
with System.Storage_Elements; use System.Storage_Elements; with System.Storage_Elements; use System.Storage_Elements;
@@ -20,7 +26,7 @@ with Interfaces.C;
package RTEMS is package RTEMS is
Structure_Alignment : constant := 16; Structure_Alignment : constant := 8;
-- --
-- RTEMS Base Types -- RTEMS Base Types
@@ -73,7 +79,7 @@ package RTEMS is
subtype Mode is RTEMS.Unsigned32; subtype Mode is RTEMS.Unsigned32;
subtype Option is RTEMS.Unsigned32; subtype Option is RTEMS.Unsigned32;
subtype Task_Priority is RTEMS.Unsigned32; subtype Task_Priority is RTEMS.Unsigned32;
subtype Notepad_Index is RTEMS.Unsigned32; subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15;
subtype Event_Set is RTEMS.Unsigned32; subtype Event_Set is RTEMS.Unsigned32;
subtype Signal_Set is RTEMS.Unsigned32; subtype Signal_Set is RTEMS.Unsigned32;
@@ -262,6 +268,7 @@ package RTEMS is
Period_Status : constant RTEMS.Interval := 0; Period_Status : constant RTEMS.Interval := 0;
Yield_Processor : constant RTEMS.Interval := 0; Yield_Processor : constant RTEMS.Interval := 0;
Current_Priority : constant RTEMS.Task_Priority := 0; Current_Priority : constant RTEMS.Task_Priority := 0;
No_Priority : constant RTEMS.Task_Priority := 0;
-- --
@@ -765,6 +772,11 @@ package RTEMS is
Status : in RTEMS.Status_Codes Status : in RTEMS.Status_Codes
) return Standard.Boolean; ) return Standard.Boolean;
function Subtract (
Left : in RTEMS.Address;
Right : in RTEMS.Address
) return RTEMS.Unsigned32;
-- --
-- RTEMS API -- RTEMS API
-- --
@@ -998,11 +1010,12 @@ package RTEMS is
-- --
procedure Semaphore_Create ( procedure Semaphore_Create (
Name : in RTEMS.Name; Name : in RTEMS.Name;
Count : in RTEMS.Unsigned32; Count : in RTEMS.Unsigned32;
Attribute_Set : in RTEMS.Attribute; Attribute_Set : in RTEMS.Attribute;
ID : out RTEMS.ID; Priority_Ceiling : in RTEMS.Task_Priority;
Result : out RTEMS.Status_Codes ID : out RTEMS.ID;
Result : out RTEMS.Status_Codes
); );
procedure Semaphore_Delete ( procedure Semaphore_Delete (
@@ -1384,6 +1397,9 @@ package RTEMS is
-- Debug Manager -- Debug Manager
-- --
Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#;
Debug_Region : constant RTEMS.Debug_Set := 16#00000001#;
procedure Debug_Enable ( procedure Debug_Enable (
To_Be_Enabled : in RTEMS.Debug_Set To_Be_Enabled : in RTEMS.Debug_Set
); );

View File

@@ -9,11 +9,18 @@
-- --
-- --
-- --
-- COPYRIGHT (c) 1989 - 1997. -- COPYRIGHT (c) 1997.
-- On-Line Applications Research Corporation (OAR). -- 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;
with Ada.Unchecked_Conversion;
with System; with System;
with Interfaces; use Interfaces; with Interfaces; use Interfaces;
with Interfaces.C; with Interfaces.C;
@@ -171,6 +178,17 @@ package body RTEMS is
end Is_Status_Successful; 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 -- RTEMS API
@@ -822,17 +840,19 @@ package body RTEMS is
-- --
procedure Semaphore_Create ( procedure Semaphore_Create (
Name : in RTEMS.Name; Name : in RTEMS.Name;
Count : in RTEMS.Unsigned32; Count : in RTEMS.Unsigned32;
Attribute_Set : in RTEMS.Attribute; Attribute_Set : in RTEMS.Attribute;
ID : out RTEMS.ID; Priority_Ceiling : in RTEMS.Task_Priority;
Result : out RTEMS.Status_Codes ID : out RTEMS.ID;
Result : out RTEMS.Status_Codes
) is ) is
function Semaphore_Create_Base ( function Semaphore_Create_Base (
Name : RTEMS.Name; Name : RTEMS.Name;
Count : RTEMS.Unsigned32; Count : RTEMS.Unsigned32;
Attribute_Set : RTEMS.Attribute; Attribute_Set : RTEMS.Attribute;
ID : access RTEMS.ID Priority_Ceiling : RTEMS.Task_Priority;
ID : access RTEMS.ID
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create"); pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
ID_Base : aliased RTEMS.ID := ID; ID_Base : aliased RTEMS.ID := ID;
@@ -842,6 +862,7 @@ package body RTEMS is
Name, Name,
Count, Count,
Attribute_Set, Attribute_Set,
Priority_Ceiling,
ID_Base'Unchecked_Access ID_Base'Unchecked_Access
); );
@@ -934,10 +955,11 @@ package body RTEMS is
) is ) is
-- XXX broken -- XXX broken
function Message_Queue_Create_Base ( function Message_Queue_Create_Base (
Name : RTEMS.Name; Name : RTEMS.Name;
Count : RTEMS.Unsigned32; Count : RTEMS.Unsigned32;
Attribute_Set : RTEMS.Attribute; Max_Message_Size : RTEMS.Unsigned32;
ID : access RTEMS.ID Attribute_Set : RTEMS.Attribute;
ID : access RTEMS.ID
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, pragma Import (C,
Message_Queue_Create_Base, "rtems_message_queue_create"); Message_Queue_Create_Base, "rtems_message_queue_create");
@@ -947,6 +969,7 @@ package body RTEMS is
Result := Message_Queue_Create_Base ( Result := Message_Queue_Create_Base (
Name, Name,
Count, Count,
Max_Message_Size,
Attribute_Set, Attribute_Set,
ID_Base'Unchecked_Access ID_Base'Unchecked_Access
); );
@@ -1931,13 +1954,14 @@ package body RTEMS is
Result : out RTEMS.Status_Codes Result : out RTEMS.Status_Codes
) is ) is
function Rate_Monotonic_Period_Base ( function Rate_Monotonic_Period_Base (
ID : RTEMS.ID ID : RTEMS.ID;
Length : RTEMS.Interval
) return RTEMS.Status_Codes; ) return RTEMS.Status_Codes;
pragma Import (C, Rate_Monotonic_Period_Base, pragma Import (C, Rate_Monotonic_Period_Base,
"rtems_rate_monotonic_period"); "rtems_rate_monotonic_period");
begin begin
Result := Rate_Monotonic_Period_base ( ID ); Result := Rate_Monotonic_Period_base ( ID, Length );
end Rate_Monotonic_Period; end Rate_Monotonic_Period;

View File

@@ -9,9 +9,15 @@
-- --
-- --
-- --
-- COPYRIGHT (c) 1989 - 1997. -- COPYRIGHT (c) 1997.
-- On-Line Applications Research Corporation (OAR). -- 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 System; with System;
with System.Storage_Elements; use System.Storage_Elements; with System.Storage_Elements; use System.Storage_Elements;
@@ -20,7 +26,7 @@ with Interfaces.C;
package RTEMS is package RTEMS is
Structure_Alignment : constant := 16; Structure_Alignment : constant := 8;
-- --
-- RTEMS Base Types -- RTEMS Base Types
@@ -73,7 +79,7 @@ package RTEMS is
subtype Mode is RTEMS.Unsigned32; subtype Mode is RTEMS.Unsigned32;
subtype Option is RTEMS.Unsigned32; subtype Option is RTEMS.Unsigned32;
subtype Task_Priority is RTEMS.Unsigned32; subtype Task_Priority is RTEMS.Unsigned32;
subtype Notepad_Index is RTEMS.Unsigned32; subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15;
subtype Event_Set is RTEMS.Unsigned32; subtype Event_Set is RTEMS.Unsigned32;
subtype Signal_Set is RTEMS.Unsigned32; subtype Signal_Set is RTEMS.Unsigned32;
@@ -262,6 +268,7 @@ package RTEMS is
Period_Status : constant RTEMS.Interval := 0; Period_Status : constant RTEMS.Interval := 0;
Yield_Processor : constant RTEMS.Interval := 0; Yield_Processor : constant RTEMS.Interval := 0;
Current_Priority : constant RTEMS.Task_Priority := 0; Current_Priority : constant RTEMS.Task_Priority := 0;
No_Priority : constant RTEMS.Task_Priority := 0;
-- --
@@ -765,6 +772,11 @@ package RTEMS is
Status : in RTEMS.Status_Codes Status : in RTEMS.Status_Codes
) return Standard.Boolean; ) return Standard.Boolean;
function Subtract (
Left : in RTEMS.Address;
Right : in RTEMS.Address
) return RTEMS.Unsigned32;
-- --
-- RTEMS API -- RTEMS API
-- --
@@ -998,11 +1010,12 @@ package RTEMS is
-- --
procedure Semaphore_Create ( procedure Semaphore_Create (
Name : in RTEMS.Name; Name : in RTEMS.Name;
Count : in RTEMS.Unsigned32; Count : in RTEMS.Unsigned32;
Attribute_Set : in RTEMS.Attribute; Attribute_Set : in RTEMS.Attribute;
ID : out RTEMS.ID; Priority_Ceiling : in RTEMS.Task_Priority;
Result : out RTEMS.Status_Codes ID : out RTEMS.ID;
Result : out RTEMS.Status_Codes
); );
procedure Semaphore_Delete ( procedure Semaphore_Delete (
@@ -1384,6 +1397,9 @@ package RTEMS is
-- Debug Manager -- Debug Manager
-- --
Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#;
Debug_Region : constant RTEMS.Debug_Set := 16#00000001#;
procedure Debug_Enable ( procedure Debug_Enable (
To_Be_Enabled : in RTEMS.Debug_Set To_Be_Enabled : in RTEMS.Debug_Set
); );