[rtems commit] ada: Introduce RTEMS.Size type

Sebastian Huber sebh at rtems.org
Mon Jan 29 05:59:32 UTC 2018


Module:    rtems
Branch:    master
Commit:    bc96f3b4b889891cb685c4bbcaf12166ca08331c
Changeset: http://git.rtems.org/rtems/commit/?id=bc96f3b4b889891cb685c4bbcaf12166ca08331c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan 23 09:53:06 2018 +0100

ada: Introduce RTEMS.Size type

Some time ago the Classic API object size related parameters were
changed to use size_t.  Reflect this in the Ada bindings.

Update #3082.

---

 cpukit/include/adainclude/rtems-message_queue.adb | 22 ++++++++--------
 cpukit/include/adainclude/rtems-message_queue.ads | 10 +++----
 cpukit/include/adainclude/rtems-partition.adb     |  8 +++---
 cpukit/include/adainclude/rtems-partition.ads     |  4 +--
 cpukit/include/adainclude/rtems-region.adb        | 32 +++++++++++------------
 cpukit/include/adainclude/rtems-region.ads        | 14 +++++-----
 cpukit/include/adainclude/rtems-tasks.adb         |  4 +--
 cpukit/include/adainclude/rtems-tasks.ads         |  2 +-
 cpukit/include/adainclude/rtems-timer.adb         |  4 +--
 cpukit/include/adainclude/rtems-timer.ads         |  2 +-
 cpukit/include/adainclude/rtems.adb               |  7 +++++
 cpukit/include/adainclude/rtems.ads               |  4 +--
 testsuites/ada/sptests/sp09/sptest.adb            |  6 +++--
 testsuites/ada/sptests/sp09/sptest.ads            |  8 +++---
 testsuites/ada/sptests/sp12/sp12.adb              |  2 ++
 testsuites/ada/sptests/sp13/sptest.adb            | 21 ++++++++-------
 testsuites/ada/sptests/sp14/sptest.adb            |  2 ++
 testsuites/ada/support/init.c                     |  4 +--
 testsuites/ada/support/test_support.adb           |  4 +--
 testsuites/ada/support/test_support.ads           |  2 +-
 testsuites/ada/tmtests/tm09/tmtest.adb            |  2 +-
 testsuites/ada/tmtests/tm10/tmtest.adb            |  6 ++---
 testsuites/ada/tmtests/tm11/tmtest.adb            |  4 +--
 testsuites/ada/tmtests/tm12/tmtest.adb            |  2 +-
 testsuites/ada/tmtests/tm13/tmtest.adb            |  4 +--
 testsuites/ada/tmtests/tm14/tmtest.adb            |  2 +-
 testsuites/ada/tmtests/tm22/tmtest.adb            |  2 +-
 27 files changed, 99 insertions(+), 85 deletions(-)

diff --git a/cpukit/include/adainclude/rtems-message_queue.adb b/cpukit/include/adainclude/rtems-message_queue.adb
index 67abf48..7437670 100644
--- a/cpukit/include/adainclude/rtems-message_queue.adb
+++ b/cpukit/include/adainclude/rtems-message_queue.adb
@@ -27,7 +27,7 @@ package body RTEMS.Message_Queue is
    procedure Create
      (Name             : in RTEMS.Name;
       Count            : in RTEMS.Unsigned32;
-      Max_Message_Size : in RTEMS.Unsigned32;
+      Max_Message_Size : in RTEMS.Size;
       Attribute_Set    : in RTEMS.Attribute;
       ID               : out RTEMS.ID;
       Result           : out RTEMS.Status_Codes)
@@ -36,7 +36,7 @@ package body RTEMS.Message_Queue is
       function Create_Base
         (Name             : RTEMS.Name;
          Count            : RTEMS.Unsigned32;
-         Max_Message_Size : RTEMS.Unsigned32;
+         Max_Message_Size : RTEMS.Size;
          Attribute_Set    : RTEMS.Attribute;
          ID               : access RTEMS.ID)
          return             RTEMS.Status_Codes;
@@ -101,13 +101,13 @@ package body RTEMS.Message_Queue is
    procedure Send
      (ID     : in RTEMS.ID;
       Buffer : in RTEMS.Address;
-      Size   : in RTEMS.Unsigned32;
+      Size   : in RTEMS.Size;
       Result : out RTEMS.Status_Codes)
    is
       function Send_Base
         (ID     : RTEMS.ID;
          Buffer : RTEMS.Address;
-         Size   : RTEMS.Unsigned32)
+         Size   : RTEMS.Size)
          return   RTEMS.Status_Codes;
       pragma Import (C, Send_Base, "rtems_message_queue_send");
    begin
@@ -119,13 +119,13 @@ package body RTEMS.Message_Queue is
    procedure Urgent
      (ID     : in RTEMS.ID;
       Buffer : in RTEMS.Address;
-      Size   : in RTEMS.Unsigned32;
+      Size   : in RTEMS.Size;
       Result : out RTEMS.Status_Codes)
    is
       function Urgent_Base
         (ID     : RTEMS.ID;
          Buffer : RTEMS.Address;
-         Size   : RTEMS.Unsigned32)
+         Size   : RTEMS.Size)
          return   RTEMS.Status_Codes;
       pragma Import
         (C,
@@ -140,14 +140,14 @@ package body RTEMS.Message_Queue is
    procedure Broadcast
      (ID     : in RTEMS.ID;
       Buffer : in RTEMS.Address;
-      Size   : in RTEMS.Unsigned32;
+      Size   : in RTEMS.Size;
       Count  : out RTEMS.Unsigned32;
       Result : out RTEMS.Status_Codes)
    is
       function Broadcast_Base
         (ID     : RTEMS.ID;
          Buffer : RTEMS.Address;
-         Size   : RTEMS.Unsigned32;
+         Size   : RTEMS.Size;
          Count  : access RTEMS.Unsigned32)
          return   RTEMS.Status_Codes;
       pragma Import
@@ -168,13 +168,13 @@ package body RTEMS.Message_Queue is
       Buffer     : in RTEMS.Address;
       Option_Set : in RTEMS.Option;
       Timeout    : in RTEMS.Interval;
-      Size       : in out RTEMS.Unsigned32;
+      Size       : in out RTEMS.Size;
       Result     : out RTEMS.Status_Codes)
    is
       function Receive_Base
         (ID         : RTEMS.ID;
          Buffer     : RTEMS.Address;
-         Size       : access RTEMS.Unsigned32;
+         Size       : access RTEMS.Size;
          Option_Set : RTEMS.Option;
          Timeout    : RTEMS.Interval)
          return       RTEMS.Status_Codes;
@@ -182,7 +182,7 @@ package body RTEMS.Message_Queue is
         (C,
          Receive_Base,
          "rtems_message_queue_receive");
-      Size_Base : aliased RTEMS.Unsigned32;
+      Size_Base : aliased RTEMS.Size;
    begin
 
       Size_Base := Size;
diff --git a/cpukit/include/adainclude/rtems-message_queue.ads b/cpukit/include/adainclude/rtems-message_queue.ads
index d5efe54..929b659 100644
--- a/cpukit/include/adainclude/rtems-message_queue.ads
+++ b/cpukit/include/adainclude/rtems-message_queue.ads
@@ -28,7 +28,7 @@ package RTEMS.Message_Queue is
    procedure Create (
       Name             : in     RTEMS.Name;
       Count            : in     RTEMS.Unsigned32;
-      Max_Message_Size : in     RTEMS.Unsigned32;
+      Max_Message_Size : in     RTEMS.Size;
       Attribute_Set    : in     RTEMS.Attribute;
       ID               :    out RTEMS.ID;
       Result           :    out RTEMS.Status_Codes
@@ -49,21 +49,21 @@ package RTEMS.Message_Queue is
    procedure Send (
       ID     : in     RTEMS.ID;
       Buffer : in     RTEMS.Address;
-      Size   : in     RTEMS.Unsigned32;
+      Size   : in     RTEMS.Size;
       Result :    out RTEMS.Status_Codes
    );
 
    procedure Urgent (
       ID     : in     RTEMS.ID;
       Buffer : in     RTEMS.Address;
-      Size   : in     RTEMS.Unsigned32;
+      Size   : in     RTEMS.Size;
       Result :    out RTEMS.Status_Codes
    );
 
    procedure Broadcast (
       ID     : in     RTEMS.ID;
       Buffer : in     RTEMS.Address;
-      Size   : in     RTEMS.Unsigned32;
+      Size   : in     RTEMS.Size;
       Count  :    out RTEMS.Unsigned32;
       Result :    out RTEMS.Status_Codes
    );
@@ -73,7 +73,7 @@ package RTEMS.Message_Queue is
       Buffer     : in     RTEMS.Address;
       Option_Set : in     RTEMS.Option;
       Timeout    : in     RTEMS.Interval;
-      Size       : in out RTEMS.Unsigned32;
+      Size       : in out RTEMS.Size;
       Result     :    out RTEMS.Status_Codes
    );
 
diff --git a/cpukit/include/adainclude/rtems-partition.adb b/cpukit/include/adainclude/rtems-partition.adb
index 84455d7..3530092 100644
--- a/cpukit/include/adainclude/rtems-partition.adb
+++ b/cpukit/include/adainclude/rtems-partition.adb
@@ -27,8 +27,8 @@ package body RTEMS.Partition is
    procedure Create
      (Name             : in RTEMS.Name;
       Starting_Address : in RTEMS.Address;
-      Length           : in RTEMS.Unsigned32;
-      Buffer_Size      : in RTEMS.Unsigned32;
+      Length           : in RTEMS.Size;
+      Buffer_Size      : in RTEMS.Size;
       Attribute_Set    : in RTEMS.Attribute;
       ID               : out RTEMS.ID;
       Result           : out RTEMS.Status_Codes)
@@ -36,8 +36,8 @@ package body RTEMS.Partition is
       function Create_Base
         (Name             : RTEMS.Name;
          Starting_Address : RTEMS.Address;
-         Length           : RTEMS.Unsigned32;
-         Buffer_Size      : RTEMS.Unsigned32;
+         Length           : RTEMS.Size;
+         Buffer_Size      : RTEMS.Size;
          Attribute_Set    : RTEMS.Attribute;
          ID               : access RTEMS.Event_Set)
          return             RTEMS.Status_Codes;
diff --git a/cpukit/include/adainclude/rtems-partition.ads b/cpukit/include/adainclude/rtems-partition.ads
index 6e3ea44..3972fe9 100644
--- a/cpukit/include/adainclude/rtems-partition.ads
+++ b/cpukit/include/adainclude/rtems-partition.ads
@@ -28,8 +28,8 @@ package RTEMS.Partition is
    procedure Create (
       Name             : in     RTEMS.Name;
       Starting_Address : in     RTEMS.Address;
-      Length           : in     RTEMS.Unsigned32;
-      Buffer_Size      : in     RTEMS.Unsigned32;
+      Length           : in     RTEMS.Size;
+      Buffer_Size      : in     RTEMS.Size;
       Attribute_Set    : in     RTEMS.Attribute;
       ID               :    out RTEMS.ID;
       Result           :    out RTEMS.Status_Codes
diff --git a/cpukit/include/adainclude/rtems-region.adb b/cpukit/include/adainclude/rtems-region.adb
index d03ca6a..e1425b8 100644
--- a/cpukit/include/adainclude/rtems-region.adb
+++ b/cpukit/include/adainclude/rtems-region.adb
@@ -27,8 +27,8 @@ package body RTEMS.Region is
    procedure Create
      (Name             : in RTEMS.Name;
       Starting_Address : in RTEMS.Address;
-      Length           : in RTEMS.Unsigned32;
-      Page_Size        : in RTEMS.Unsigned32;
+      Length           : in RTEMS.Size;
+      Page_Size        : in RTEMS.Size;
       Attribute_Set    : in RTEMS.Attribute;
       ID               : out RTEMS.ID;
       Result           : out RTEMS.Status_Codes)
@@ -36,8 +36,8 @@ package body RTEMS.Region is
       function Create_Base
         (Name             : RTEMS.Name;
          Starting_Address : RTEMS.Address;
-         Length           : RTEMS.Unsigned32;
-         Page_Size        : RTEMS.Unsigned32;
+         Length           : RTEMS.Size;
+         Page_Size        : RTEMS.Size;
          Attribute_Set    : RTEMS.Attribute;
          ID               : access RTEMS.ID)
          return             RTEMS.Status_Codes;
@@ -90,13 +90,13 @@ package body RTEMS.Region is
    procedure Extend
      (ID               : in RTEMS.ID;
       Starting_Address : in RTEMS.Address;
-      Length           : in RTEMS.Unsigned32;
+      Length           : in RTEMS.Size;
       Result           : out RTEMS.Status_Codes)
    is
       function Extend_Base
         (ID               : RTEMS.ID;
          Starting_Address : RTEMS.Address;
-         Length           : RTEMS.Unsigned32)
+         Length           : RTEMS.Size)
          return             RTEMS.Status_Codes;
       pragma Import (C, Extend_Base, "rtems_region_extend");
    begin
@@ -107,7 +107,7 @@ package body RTEMS.Region is
 
    procedure Get_Segment
      (ID         : in RTEMS.ID;
-      Size       : in RTEMS.Unsigned32;
+      Size       : in RTEMS.Size;
       Option_Set : in RTEMS.Option;
       Timeout    : in RTEMS.Interval;
       Segment    : out RTEMS.Address;
@@ -115,7 +115,7 @@ package body RTEMS.Region is
    is
       function Get_Segment_Base
         (ID         : RTEMS.ID;
-         Size       : RTEMS.Unsigned32;
+         Size       : RTEMS.Size;
          Option_Set : RTEMS.Option;
          Timeout    : RTEMS.Interval;
          Segment    : access RTEMS.Address)
@@ -138,19 +138,19 @@ package body RTEMS.Region is
    procedure Get_Segment_Size
      (ID      : in RTEMS.ID;
       Segment : in RTEMS.Address;
-      Size    : out RTEMS.Unsigned32;
+      Size    : out RTEMS.Size;
       Result  : out RTEMS.Status_Codes)
    is
       function Get_Segment_Size_Base
         (ID      : RTEMS.ID;
          Segment : RTEMS.Address;
-         Size    : access RTEMS.Unsigned32)
+         Size    : access RTEMS.Size)
          return    RTEMS.Status_Codes;
       pragma Import
         (C,
          Get_Segment_Size_Base,
          "rtems_region_get_segment_size");
-      Size_Base : aliased RTEMS.Unsigned32;
+      Size_Base : aliased RTEMS.Size;
    begin
 
       Result := Get_Segment_Size_Base (ID, Segment, Size_Base'Access);
@@ -180,21 +180,21 @@ package body RTEMS.Region is
    procedure Resize_Segment
      (ID       : in RTEMS.ID;
       Segment  : in RTEMS.Address;
-      Size     : in RTEMS.Unsigned32;
-      Old_Size : out RTEMS.Unsigned32;
+      Size     : in RTEMS.Size;
+      Old_Size : out RTEMS.Size;
       Result   : out RTEMS.Status_Codes)
    is
       function Resize_Segment_Base
         (ID       : RTEMS.ID;
          Segment  : RTEMS.Address;
-         Size     : RTEMS.Unsigned32;
-         Old_Size : access RTEMS.Unsigned32)
+         Size     : RTEMS.Size;
+         Old_Size : access RTEMS.Size)
          return     RTEMS.Status_Codes;
       pragma Import
         (C,
          Resize_Segment_Base,
          "rtems_region_resize_segment");
-      Old_Size_Base : aliased RTEMS.Unsigned32;
+      Old_Size_Base : aliased RTEMS.Size;
    begin
 
       Result   :=
diff --git a/cpukit/include/adainclude/rtems-region.ads b/cpukit/include/adainclude/rtems-region.ads
index d75a939..753588d 100644
--- a/cpukit/include/adainclude/rtems-region.ads
+++ b/cpukit/include/adainclude/rtems-region.ads
@@ -28,8 +28,8 @@ package RTEMS.Region is
    procedure Create (
       Name             : in     RTEMS.Name;
       Starting_Address : in     RTEMS.Address;
-      Length           : in     RTEMS.Unsigned32;
-      Page_Size        : in     RTEMS.Unsigned32;
+      Length           : in     RTEMS.Size;
+      Page_Size        : in     RTEMS.Size;
       Attribute_Set    : in     RTEMS.Attribute;
       ID               :    out RTEMS.ID;
       Result           :    out RTEMS.Status_Codes
@@ -49,13 +49,13 @@ package RTEMS.Region is
    procedure Extend (
       ID               : in     RTEMS.ID;
       Starting_Address : in     RTEMS.Address;
-      Length           : in     RTEMS.Unsigned32;
+      Length           : in     RTEMS.Size;
       Result           :    out RTEMS.Status_Codes
    );
 
    procedure Get_Segment (
       ID         : in     RTEMS.ID;
-      Size       : in     RTEMS.Unsigned32;
+      Size       : in     RTEMS.Size;
       Option_Set : in     RTEMS.Option;
       Timeout    : in     RTEMS.Interval;
       Segment    :    out RTEMS.Address;
@@ -65,7 +65,7 @@ package RTEMS.Region is
    procedure Get_Segment_Size (
       ID         : in     RTEMS.ID;
       Segment    : in     RTEMS.Address;
-      Size       :    out RTEMS.Unsigned32;
+      Size       :    out RTEMS.Size;
       Result     :    out RTEMS.Status_Codes
    );
 
@@ -78,8 +78,8 @@ package RTEMS.Region is
    procedure Resize_Segment (
       ID         : in     RTEMS.ID;
       Segment    : in     RTEMS.Address;
-      Size       : in     RTEMS.Unsigned32;
-      Old_Size   :    out RTEMS.Unsigned32;
+      Size       : in     RTEMS.Size;
+      Old_Size   :    out RTEMS.Size;
       Result     :    out RTEMS.Status_Codes
    );
 
diff --git a/cpukit/include/adainclude/rtems-tasks.adb b/cpukit/include/adainclude/rtems-tasks.adb
index 1fc7fcd..bc34af6 100644
--- a/cpukit/include/adainclude/rtems-tasks.adb
+++ b/cpukit/include/adainclude/rtems-tasks.adb
@@ -27,7 +27,7 @@ package body RTEMS.Tasks is
    procedure Create
      (Name             : in RTEMS.Name;
       Initial_Priority : in Priority;
-      Stack_Size       : in RTEMS.Unsigned32;
+      Stack_Size       : in RTEMS.Size;
       Initial_Modes    : in RTEMS.Mode;
       Attribute_Set    : in RTEMS.Attribute;
       ID               : out RTEMS.ID;
@@ -36,7 +36,7 @@ package body RTEMS.Tasks is
       function Create_Base
         (Name             : RTEMS.Name;
          Initial_Priority : Priority;
-         Stack_Size       : RTEMS.Unsigned32;
+         Stack_Size       : RTEMS.Size;
          Initial_Modes    : RTEMS.Mode;
          Attribute_Set    : RTEMS.Attribute;
          ID               : access RTEMS.ID)
diff --git a/cpukit/include/adainclude/rtems-tasks.ads b/cpukit/include/adainclude/rtems-tasks.ads
index cdd95ea..ca24996 100644
--- a/cpukit/include/adainclude/rtems-tasks.ads
+++ b/cpukit/include/adainclude/rtems-tasks.ads
@@ -42,7 +42,7 @@ package RTEMS.Tasks is
    procedure Create (
       Name             : in     RTEMS.Name;
       Initial_Priority : in     Priority;
-      Stack_Size       : in     Unsigned32;
+      Stack_Size       : in     RTEMS.Size;
       Initial_Modes    : in     RTEMS.Mode;
       Attribute_Set    : in     RTEMS.Attribute;
       ID               :    out RTEMS.ID;
diff --git a/cpukit/include/adainclude/rtems-timer.adb b/cpukit/include/adainclude/rtems-timer.adb
index 706b07c..c6f115d 100644
--- a/cpukit/include/adainclude/rtems-timer.adb
+++ b/cpukit/include/adainclude/rtems-timer.adb
@@ -184,13 +184,13 @@ package body RTEMS.Timer is
 
    procedure Initiate_Server
      (Server_Priority : in RTEMS.Tasks.Priority;
-      Stack_Size      : in RTEMS.Unsigned32;
+      Stack_Size      : in RTEMS.Size;
       Attribute_Set   : in RTEMS.Attribute;
       Result          : out RTEMS.Status_Codes)
    is
       function Initiate_Server_Base
         (Server_Priority : RTEMS.Tasks.Priority;
-         Stack_Size      : RTEMS.Unsigned32;
+         Stack_Size      : RTEMS.Size;
          Attribute_Set   : RTEMS.Attribute)
          return            RTEMS.Status_Codes;
       pragma Import
diff --git a/cpukit/include/adainclude/rtems-timer.ads b/cpukit/include/adainclude/rtems-timer.ads
index a6d1f9b..de00c3f 100644
--- a/cpukit/include/adainclude/rtems-timer.ads
+++ b/cpukit/include/adainclude/rtems-timer.ads
@@ -98,7 +98,7 @@ package RTEMS.Timer is
 
    procedure Initiate_Server (
       Server_Priority : in     RTEMS.Tasks.Priority;
-      Stack_Size      : in     Unsigned32;
+      Stack_Size      : in     RTEMS.Size;
       Attribute_Set   : in     RTEMS.Attribute;
       Result          :    out RTEMS.Status_Codes
    );
diff --git a/cpukit/include/adainclude/rtems.adb b/cpukit/include/adainclude/rtems.adb
index e717f42..d88f182 100644
--- a/cpukit/include/adainclude/rtems.adb
+++ b/cpukit/include/adainclude/rtems.adb
@@ -229,4 +229,11 @@ package body RTEMS is
       Shutdown_Executive_Base (Status);
    end Shutdown_Executive;
 
+   function Minimum_Stack_Size return RTEMS.Size is
+      size : RTEMS.Unsigned32;
+      pragma Import (C, size, "rtems_minimum_stack_size");
+   begin
+      return RTEMS.Size (size);
+   end Minimum_Stack_Size;
+
 end RTEMS;
diff --git a/cpukit/include/adainclude/rtems.ads b/cpukit/include/adainclude/rtems.ads
index 470d67d..5069c36 100644
--- a/cpukit/include/adainclude/rtems.ads
+++ b/cpukit/include/adainclude/rtems.ads
@@ -46,6 +46,7 @@ pragma Elaborate_Body (RTEMS);
    subtype Address             is System.Address;
    subtype Single              is Interfaces.C.C_float;
    subtype Double              is Interfaces.C.Double;
+   subtype Size                is Interfaces.C.size_t;
 
    --
    --  The following define the size of each of the base types in
@@ -206,8 +207,7 @@ pragma Elaborate_Body (RTEMS);
    ) return RTEMS.Mode;
    pragma Import (C, Interrupt_Level, "rtems_interrupt_level_body");
 
-   Minimum_Stack_Size : RTEMS.Unsigned32;
-   pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size");
+   function Minimum_Stack_Size return RTEMS.Size;
 
    --
    --  Notepad index constants
diff --git a/testsuites/ada/sptests/sp09/sptest.adb b/testsuites/ada/sptests/sp09/sptest.adb
index 519d0ad..7ebb67b 100644
--- a/testsuites/ada/sptests/sp09/sptest.adb
+++ b/testsuites/ada/sptests/sp09/sptest.adb
@@ -30,6 +30,8 @@ with RTEMS.RATE_MONOTONIC;
 with RTEMS.REGION;
 with RTEMS.SEMAPHORE;
 with RTEMS.TIMER;
+with Interfaces.C;
+use Interfaces.C;
 
 package body SPTEST is
 
@@ -1126,7 +1128,7 @@ package body SPTEST is
       BUFFER         : SPTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
       COUNT          : RTEMS.UNSIGNED32;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
@@ -3035,7 +3037,7 @@ package body SPTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : SPTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
diff --git a/testsuites/ada/sptests/sp09/sptest.ads b/testsuites/ada/sptests/sp09/sptest.ads
index d1bef16..7191dd5 100644
--- a/testsuites/ada/sptests/sp09/sptest.ads
+++ b/testsuites/ada/sptests/sp09/sptest.ads
@@ -161,12 +161,12 @@ package SPTEST is
 --  starting area and length.
 -- 
 
-   REGION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 4095 )
-      of RTEMS.UNSIGNED32;
+   REGION_GOOD_AREA : array ( RTEMS.Size range 0 .. 4095 )
+      of RTEMS.Size;
    for REGION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
 
-   REGION_START_OFFSET : constant RTEMS.UNSIGNED32 := 2048;
-   REGION_LENGTH       : constant RTEMS.UNSIGNED32 := 512;
+   REGION_START_OFFSET : constant RTEMS.Size := 2048;
+   REGION_LENGTH       : constant RTEMS.Size := 512;
 
 --
 --  The following area defines a memory area to be used as the
diff --git a/testsuites/ada/sptests/sp12/sp12.adb b/testsuites/ada/sptests/sp12/sp12.adb
index 62a5761..08a39a8 100644
--- a/testsuites/ada/sptests/sp12/sp12.adb
+++ b/testsuites/ada/sptests/sp12/sp12.adb
@@ -22,6 +22,8 @@ with RTEMS;
 with RTEMS.TASKS;
 with SPTEST;
 with TEST_SUPPORT;
+with Interfaces.C;
+use Interfaces.C;
 
 procedure SP12 is
   INIT_ID : RTEMS.ID;
diff --git a/testsuites/ada/sptests/sp13/sptest.adb b/testsuites/ada/sptests/sp13/sptest.adb
index 96b7461..7621af6 100644
--- a/testsuites/ada/sptests/sp13/sptest.adb
+++ b/testsuites/ada/sptests/sp13/sptest.adb
@@ -25,6 +25,7 @@ with TEST_SUPPORT;
 with TEXT_IO;
 with UNSIGNED32_IO;
 use type RTEMS.STATUS_CODES;
+use type RTEMS.Size;
 
 package body SPTEST is
 
@@ -227,9 +228,9 @@ package body SPTEST is
       BUFFER                     : SPTEST.BUFFER;
       BUFFER_POINTER             : constant RTEMS.ADDRESS := BUFFER'ADDRESS;
       COUNT                      : RTEMS.UNSIGNED32;
-      MESSAGE_SIZE               : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE               : RTEMS.Size := 0;
       STATUS                     : RTEMS.STATUS_CODES;
-      SIZE                       : RTEMS.UNSIGNED32 := 0;
+      SIZE                       : RTEMS.Size := 0;
    begin
 
       RTEMS.MESSAGE_QUEUE.IDENT( 
@@ -578,7 +579,7 @@ TEST_SUPPORT.PAUSE;
           RTEMS.MESSAGE_QUEUE.CREATE(
               SPTEST.QUEUE_NAME( 1 ),
               2,            -- just 2 msgs each
-              RTEMS.UNSIGNED32( QUEUE_SIZE ),
+              RTEMS.Size( QUEUE_SIZE ),
               RTEMS.DEFAULT_ATTRIBUTES,
               QUEUE_ID( 1 ),
               STATUS
@@ -606,7 +607,7 @@ TEST_SUPPORT.PAUSE;
           RTEMS.MESSAGE_QUEUE.CREATE(
               SPTEST.QUEUE_NAME( 1 ),
               2,            -- just 2 msgs each
-              RTEMS.UNSIGNED32( QUEUE_SIZE ),
+              RTEMS.Size( QUEUE_SIZE ),
               RTEMS.DEFAULT_ATTRIBUTES,
               SPTEST.QUEUE_ID( 1 ),
               STATUS
@@ -620,7 +621,7 @@ TEST_SUPPORT.PAUSE;
           RTEMS.MESSAGE_QUEUE.SEND(
              SPTEST.QUEUE_ID( 1 ),
              BIG_SEND_BUFFER_POINTER,
-             RTEMS.UNSIGNED32( QUEUE_SIZE + 1 ),
+             RTEMS.Size( QUEUE_SIZE + 1 ),
              STATUS
           );
           TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
@@ -631,7 +632,7 @@ TEST_SUPPORT.PAUSE;
           RTEMS.MESSAGE_QUEUE.SEND(
              SPTEST.QUEUE_ID( 1 ),
              BIG_SEND_BUFFER_POINTER,
-             RTEMS.UNSIGNED32( QUEUE_SIZE ),
+             RTEMS.Size( QUEUE_SIZE ),
              STATUS
           );
           TEST_SUPPORT.DIRECTIVE_FAILED(
@@ -639,7 +640,7 @@ TEST_SUPPORT.PAUSE;
           );
 
           -- now read and verify the message just sent
-          SIZE := INTERFACES.UNSIGNED_32(QUEUE_SIZE);
+          SIZE := RTEMS.Size(QUEUE_SIZE);
           RTEMS.MESSAGE_QUEUE.RECEIVE(
              SPTEST.QUEUE_ID( 1 ),
              BIG_RECEIVE_BUFFER_POINTER,
@@ -651,7 +652,7 @@ TEST_SUPPORT.PAUSE;
           TEST_SUPPORT.DIRECTIVE_FAILED(
              STATUS, "message_queue_receive exact size"
           );
-          if SIZE /= RTEMS.UNSIGNED32( QUEUE_SIZE ) then
+          if SIZE /= RTEMS.Size( QUEUE_SIZE ) then
               TEXT_IO.PUT(
                  "TA1 - exact size size match failed for queue_size = "
               );
@@ -694,7 +695,7 @@ TEST_SUPPORT.PAUSE;
       BUFFER            : SPTEST.BUFFER;
       BUFFER_POINTER    : RTEMS.ADDRESS;
       PREVIOUS_PRIORITY : RTEMS.TASKS.PRIORITY;
-      MESSAGE_SIZE      : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE      : RTEMS.Size := 0;
       STATUS            : RTEMS.STATUS_CODES;
    begin
 
@@ -830,7 +831,7 @@ TEST_SUPPORT.PAUSE;
       BUFFER         : SPTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
       COUNT          : RTEMS.UNSIGNED32;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
diff --git a/testsuites/ada/sptests/sp14/sptest.adb b/testsuites/ada/sptests/sp14/sptest.adb
index eb9ff3c..15239e3 100644
--- a/testsuites/ada/sptests/sp14/sptest.adb
+++ b/testsuites/ada/sptests/sp14/sptest.adb
@@ -25,6 +25,8 @@ with UNSIGNED32_IO;
 with INTERFACES; use INTERFACES;
 with RTEMS.TIMER;
 with RTEMS.SIGNAL;
+with Interfaces.C;
+use Interfaces.C;
 
 package body SPTEST is
 
diff --git a/testsuites/ada/support/init.c b/testsuites/ada/support/init.c
index 3e395fc..413e52e 100644
--- a/testsuites/ada/support/init.c
+++ b/testsuites/ada/support/init.c
@@ -35,7 +35,7 @@ void ada_test_begin(void);
 void ada_test_end(void);
 uint32_t milliseconds_per_tick(void);
 uint32_t ticks_per_second(void);
-uint32_t work_space_size(void);
+size_t work_space_size(void);
 uint32_t is_configured_multiprocessing(void);
 uint32_t get_node(void);
 rtems_id tcb_to_id(Thread_Control *tcb);
@@ -84,7 +84,7 @@ uint32_t ticks_per_second(void)
   return rtems_clock_get_ticks_per_second();
 }
 
-uint32_t work_space_size(void)
+size_t work_space_size(void)
 {
   return rtems_configuration_get_work_space_size()
     + rtems_configuration_get_stack_space_size();
diff --git a/testsuites/ada/support/test_support.adb b/testsuites/ada/support/test_support.adb
index bc636ce..6a46b42 100644
--- a/testsuites/ada/support/test_support.adb
+++ b/testsuites/ada/support/test_support.adb
@@ -227,8 +227,8 @@ package body Test_Support is
 --
 
    function Work_Space_Size
-   return RTEMS.Unsigned32 is 
-      function Work_Space_Size_Base return RTEMS.Unsigned32;
+   return RTEMS.Size is
+      function Work_Space_Size_Base return RTEMS.Size;
       pragma Import (C, Work_Space_Size_Base, "work_space_size");
    begin
       return Work_Space_Size_Base;
diff --git a/testsuites/ada/support/test_support.ads b/testsuites/ada/support/test_support.ads
index e3a71a3..a155747 100644
--- a/testsuites/ada/support/test_support.ads
+++ b/testsuites/ada/support/test_support.ads
@@ -181,7 +181,7 @@ package Test_Support is
 --
 
    function Work_Space_Size
-   return RTEMS.Unsigned32;
+   return RTEMS.Size;
 
 --
 --  Return an indication of whether multiprocessing is configured
diff --git a/testsuites/ada/tmtests/tm09/tmtest.adb b/testsuites/ada/tmtests/tm09/tmtest.adb
index ee54c19..88c0163 100644
--- a/testsuites/ada/tmtests/tm09/tmtest.adb
+++ b/testsuites/ada/tmtests/tm09/tmtest.adb
@@ -131,7 +131,7 @@ package body TMTEST is
       EMPTY_FLUSH_COUNT : RTEMS.UNSIGNED32;
       BUFFER            : TMTEST.BUFFER;
       BUFFER_POINTER    : RTEMS.ADDRESS;
-      MESSAGE_SIZE      : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE      : RTEMS.Size := 0;
       STATUS            : RTEMS.STATUS_CODES;
    begin
 
diff --git a/testsuites/ada/tmtests/tm10/tmtest.adb b/testsuites/ada/tmtests/tm10/tmtest.adb
index 23e2513..54836fb 100644
--- a/testsuites/ada/tmtests/tm10/tmtest.adb
+++ b/testsuites/ada/tmtests/tm10/tmtest.adb
@@ -61,7 +61,7 @@ package body TMTEST is
       TASK_ID        : RTEMS.ID;
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
@@ -147,7 +147,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
@@ -176,7 +176,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
  
diff --git a/testsuites/ada/tmtests/tm11/tmtest.adb b/testsuites/ada/tmtests/tm11/tmtest.adb
index b454462..82ab9da 100644
--- a/testsuites/ada/tmtests/tm11/tmtest.adb
+++ b/testsuites/ada/tmtests/tm11/tmtest.adb
@@ -149,7 +149,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
@@ -189,7 +189,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
  
diff --git a/testsuites/ada/tmtests/tm12/tmtest.adb b/testsuites/ada/tmtests/tm12/tmtest.adb
index 11a4f6a..fa469a1 100644
--- a/testsuites/ada/tmtests/tm12/tmtest.adb
+++ b/testsuites/ada/tmtests/tm12/tmtest.adb
@@ -183,7 +183,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
  
diff --git a/testsuites/ada/tmtests/tm13/tmtest.adb b/testsuites/ada/tmtests/tm13/tmtest.adb
index 6bb8d3f..886579c 100644
--- a/testsuites/ada/tmtests/tm13/tmtest.adb
+++ b/testsuites/ada/tmtests/tm13/tmtest.adb
@@ -148,7 +148,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 
@@ -187,7 +187,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
  
diff --git a/testsuites/ada/tmtests/tm14/tmtest.adb b/testsuites/ada/tmtests/tm14/tmtest.adb
index b2f676e..72d95be 100644
--- a/testsuites/ada/tmtests/tm14/tmtest.adb
+++ b/testsuites/ada/tmtests/tm14/tmtest.adb
@@ -194,7 +194,7 @@ package body TMTEST is
       pragma Unreferenced(ARGUMENT);
       BUFFER         : TMTEST.BUFFER;
       BUFFER_POINTER : RTEMS.ADDRESS;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
  
diff --git a/testsuites/ada/tmtests/tm22/tmtest.adb b/testsuites/ada/tmtests/tm22/tmtest.adb
index 0ef326b..88588bd 100644
--- a/testsuites/ada/tmtests/tm22/tmtest.adb
+++ b/testsuites/ada/tmtests/tm22/tmtest.adb
@@ -137,7 +137,7 @@ package body TMTEST is
       BUFFER_POINTER : RTEMS.ADDRESS;
       OVERHEAD       : RTEMS.UNSIGNED32;
       COUNT          : RTEMS.UNSIGNED32;
-      MESSAGE_SIZE   : RTEMS.UNSIGNED32 := 0;
+      MESSAGE_SIZE   : RTEMS.Size := 0;
       STATUS         : RTEMS.STATUS_CODES;
    begin
 



More information about the vc mailing list