[Ada] VxWorks inconsistent use of return type (vx_freq_t)
authorDoug Rupp <rupp@adacore.com>
Mon, 12 Jul 2021 17:52:32 +0000 (10:52 -0700)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 22 Sep 2021 15:01:43 +0000 (15:01 +0000)
gcc/ada/

* libgnarl/s-osinte__vxworks.ads (SVE): New package renaming
(vx_freq_t): New subtype.
(sysClkRateGet): Return vx_freq_t.
* libgnarl/s-vxwext.ads (vx_freq_t): New type.
* libgnarl/s-vxwext__kernel.ads: Likewise.
* libgnarl/s-vxwext__rtp.ads: Likewise.

gcc/ada/libgnarl/s-osinte__vxworks.ads
gcc/ada/libgnarl/s-vxwext.ads
gcc/ada/libgnarl/s-vxwext__kernel.ads
gcc/ada/libgnarl/s-vxwext__rtp.ads

index a2d5620..384cdec 100644 (file)
@@ -57,6 +57,8 @@ package System.OS_Interface is
    type unsigned_long_long is mod 2 ** long_long'Size;
    type size_t             is mod 2 ** Standard'Address_Size;
 
+   subtype vx_freq_t       is System.VxWorks.Ext.vx_freq_t;
+
    -----------
    -- Errno --
    -----------
@@ -312,7 +314,7 @@ package System.OS_Interface is
    function taskDelay (ticks : int) return int;
    pragma Import (C, taskDelay, "taskDelay");
 
-   function sysClkRateGet return int;
+   function sysClkRateGet return vx_freq_t;
    pragma Import (C, sysClkRateGet, "sysClkRateGet");
 
    --  VxWorks 5.x specific functions
index 915db33..1c9847f 100644 (file)
@@ -46,6 +46,9 @@ package System.VxWorks.Ext is
    subtype int is Interfaces.C.int;
    subtype unsigned is Interfaces.C.unsigned;
 
+   type vx_freq_t is new unsigned;
+   --  Equivalent of the C type _Vx_freq_t
+
    type Interrupt_Handler is access procedure (parameter : System.Address);
    pragma Convention (C, Interrupt_Handler);
 
index 3c200a1..6cecf18 100644 (file)
@@ -45,6 +45,9 @@ package System.VxWorks.Ext is
    subtype int is Interfaces.C.int;
    subtype unsigned is Interfaces.C.unsigned;
 
+   type vx_freq_t is new unsigned;
+   --  Equivalent of the C type _Vx_freq_t
+
    type Interrupt_Handler is access procedure (parameter : System.Address);
    pragma Convention (C, Interrupt_Handler);
 
index d13344e..d955c9c 100644 (file)
@@ -45,6 +45,9 @@ package System.VxWorks.Ext is
    subtype int is Interfaces.C.int;
    subtype unsigned is Interfaces.C.unsigned;
 
+   type vx_freq_t is new unsigned;
+   --  Equivalent of the C type _Vx_freq_t
+
    type Interrupt_Handler is access procedure (parameter : System.Address);
    pragma Convention (C, Interrupt_Handler);