summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-23 09:53:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-29 06:58:28 +0100
commitbc96f3b4b889891cb685c4bbcaf12166ca08331c (patch)
treef83b796d2dcc1bfbad1501d8e40a3c4277695e86
parentd8de6b9dbe4ab1ef375ecce55e8bfb1028c5dd13 (diff)
downloadrtems-bc96f3b4b889891cb685c4bbcaf12166ca08331c.tar.bz2
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.
-rw-r--r--cpukit/include/adainclude/rtems-message_queue.adb22
-rw-r--r--cpukit/include/adainclude/rtems-message_queue.ads10
-rw-r--r--cpukit/include/adainclude/rtems-partition.adb8
-rw-r--r--cpukit/include/adainclude/rtems-partition.ads4
-rw-r--r--cpukit/include/adainclude/rtems-region.adb32
-rw-r--r--cpukit/include/adainclude/rtems-region.ads14
-rw-r--r--cpukit/include/adainclude/rtems-tasks.adb4
-rw-r--r--cpukit/include/adainclude/rtems-tasks.ads2
-rw-r--r--cpukit/include/adainclude/rtems-timer.adb4
-rw-r--r--cpukit/include/adainclude/rtems-timer.ads2
-rw-r--r--cpukit/include/adainclude/rtems.adb7
-rw-r--r--cpukit/include/adainclude/rtems.ads4
-rw-r--r--testsuites/ada/sptests/sp09/sptest.adb6
-rw-r--r--testsuites/ada/sptests/sp09/sptest.ads8
-rw-r--r--testsuites/ada/sptests/sp12/sp12.adb2
-rw-r--r--testsuites/ada/sptests/sp13/sptest.adb21
-rw-r--r--testsuites/ada/sptests/sp14/sptest.adb2
-rw-r--r--testsuites/ada/support/init.c4
-rw-r--r--testsuites/ada/support/test_support.adb4
-rw-r--r--testsuites/ada/support/test_support.ads2
-rw-r--r--testsuites/ada/tmtests/tm09/tmtest.adb2
-rw-r--r--testsuites/ada/tmtests/tm10/tmtest.adb6
-rw-r--r--testsuites/ada/tmtests/tm11/tmtest.adb4
-rw-r--r--testsuites/ada/tmtests/tm12/tmtest.adb2
-rw-r--r--testsuites/ada/tmtests/tm13/tmtest.adb4
-rw-r--r--testsuites/ada/tmtests/tm14/tmtest.adb2
-rw-r--r--testsuites/ada/tmtests/tm22/tmtest.adb2
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 67abf48baf..7437670554 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 d5efe54ffe..929b659d75 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 84455d79cd..3530092334 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 6e3ea44a9d..3972fe957c 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 d03ca6a2b1..e1425b8496 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 d75a939b8b..753588d7a8 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 1fc7fcdd1e..bc34af681b 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 cdd95ea309..ca249961b5 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 706b07cb4f..c6f115d863 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 a6d1f9b0f8..de00c3f305 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 e717f42bab..d88f1827b4 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 470d67dc7d..5069c36011 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 519d0ad4cb..7ebb67b54e 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 d1bef16c96..7191dd59ce 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 62a5761e51..08a39a869b 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 96b74618b7..7621af6252 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 eb9ff3c34a..15239e30b4 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 3e395fc15f..413e52e1eb 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 bc636cee11..6a46b427ce 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 e3a71a33a0..a15574782e 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 ee54c199d2..88c016364b 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 23e2513541..54836fb77d 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 b454462e2f..82ab9da4f1 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 11a4f6abc1..fa469a1eb4 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 6bb8d3fb01..886579c986 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 b2f676e189..72d95bee3c 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 0ef326b97d..88588bd89d 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