[Ada] VxWorks inconsistent use of return type (Int_Unlock)
authorDoug Rupp <rupp@adacore.com>
Mon, 12 Jul 2021 18:47:53 +0000 (11:47 -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: Make procedure vice function.
* libgnarl/s-vxwext.ads: Likewise.
* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
* libgnarl/s-vxwext__kernel.adb: Likewise.
* libgnarl/s-vxwext__kernel.ads: Likewise.
* libgnarl/s-vxwext__rtp-smp.adb: Likewise.
* libgnarl/s-vxwext__rtp.adb: Likewise.
* libgnarl/s-vxwext__rtp.ads: Likewise.
* libgnarl/s-taprop__vxworks.adb (Stop_All_Tasks): Call
Int_Unlock as a procedure.

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

index 384cdec..b288237 100644 (file)
@@ -232,8 +232,7 @@ package System.OS_Interface is
    --  If we are in the kernel space, lock interrupts. It typically maps to
    --  intLock.
 
-   function Int_Unlock (Old : int) return int
-     renames System.VxWorks.Ext.Int_Unlock;
+   procedure Int_Unlock (Old : int) renames System.VxWorks.Ext.Int_Unlock;
    --  If we are in the kernel space, unlock interrupts. It typically maps to
    --  intUnlock. The parameter Old is only used on PowerPC where it contains
    --  the returned value from Int_Lock (the old MPSR).
index a87d1a0..2b98833 100644 (file)
@@ -1268,7 +1268,7 @@ package body System.Task_Primitives.Operations is
          C := C.Common.All_Tasks_Link;
       end loop;
 
-      Dummy := Int_Unlock (Old);
+      Int_Unlock (Old);
    end Stop_All_Tasks;
 
    ---------------
index 1c9847f..8497d2c 100644 (file)
@@ -57,7 +57,7 @@ package System.VxWorks.Ext is
    function Int_Lock return int;
    pragma Import (C, Int_Lock, "intLock");
 
-   function Int_Unlock (Old : int) return int;
+   procedure Int_Unlock (Old : int);
    pragma Import (C, Int_Unlock, "intUnlock");
 
    function Interrupt_Connect
index ea1f71c..8c91c45 100644 (file)
@@ -48,10 +48,10 @@ package body System.VxWorks.Ext is
    -- Int_Unlock --
    ----------------
 
-   function Int_Unlock (Old : int) return int is
+   procedure Int_Unlock (Old : int) is
       pragma Unreferenced (Old);
    begin
-      return ERROR;
+      null;
    end Int_Unlock;
 
    ---------------
index 4743540..7d3cc8d 100644 (file)
@@ -49,10 +49,10 @@ package body System.VxWorks.Ext is
    -- Int_Unlock --
    ----------------
 
-   function intUnlock (Old : int) return int;
+   procedure intUnlock (Old : int);
    pragma Import (C, intUnlock, "intUnlock");
 
-   function Int_Unlock (Old : int) return int renames intUnlock;
+   procedure Int_Unlock (Old : int) renames intUnlock;
 
    ---------------
    -- semDelete --
index 6cecf18..57ce053 100644 (file)
@@ -56,7 +56,7 @@ package System.VxWorks.Ext is
    function Int_Lock return int;
    pragma Convention (C, Int_Lock);
 
-   function Int_Unlock (Old : int) return int;
+   procedure Int_Unlock (Old : int);
    pragma Convention (C, Int_Unlock);
 
    function Interrupt_Connect
index 241a8f5..8061c37 100644 (file)
@@ -48,10 +48,10 @@ package body System.VxWorks.Ext is
    -- Int_Unlock --
    ----------------
 
-   function Int_Unlock (Old : int) return int is
+   procedure Int_Unlock (Old : int) is
       pragma Unreferenced (Old);
    begin
-      return ERROR;
+      null;
    end Int_Unlock;
 
    -----------------------
index f188ff8..65511b0 100644 (file)
@@ -48,10 +48,10 @@ package body System.VxWorks.Ext is
    -- Int_Unlock --
    ----------------
 
-   function Int_Unlock (Old : int) return int is
+   procedure Int_Unlock (Old : int) is
       pragma Unreferenced (Old);
    begin
-      return ERROR;
+      null;
    end Int_Unlock;
 
    -----------------------
index d955c9c..70dfcbc 100644 (file)
@@ -56,7 +56,7 @@ package System.VxWorks.Ext is
    function Int_Lock return int;
    pragma Inline (Int_Lock);
 
-   function Int_Unlock (Old : int) return int;
+   procedure Int_Unlock (Old : int);
    pragma Inline (Int_Unlock);
 
    function Interrupt_Connect