From 064056d7b54538dbe47834e8951edf837ee91dc4 Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Mon, 12 Jul 2021 11:47:53 -0700 Subject: [PATCH] [Ada] VxWorks inconsistent use of return type (Int_Unlock) 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 | 3 +-- gcc/ada/libgnarl/s-taprop__vxworks.adb | 2 +- gcc/ada/libgnarl/s-vxwext.ads | 2 +- gcc/ada/libgnarl/s-vxwext__kernel-smp.adb | 4 ++-- gcc/ada/libgnarl/s-vxwext__kernel.adb | 4 ++-- gcc/ada/libgnarl/s-vxwext__kernel.ads | 2 +- gcc/ada/libgnarl/s-vxwext__rtp-smp.adb | 4 ++-- gcc/ada/libgnarl/s-vxwext__rtp.adb | 4 ++-- gcc/ada/libgnarl/s-vxwext__rtp.ads | 2 +- 9 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gcc/ada/libgnarl/s-osinte__vxworks.ads b/gcc/ada/libgnarl/s-osinte__vxworks.ads index 384cdec..b288237 100644 --- a/gcc/ada/libgnarl/s-osinte__vxworks.ads +++ b/gcc/ada/libgnarl/s-osinte__vxworks.ads @@ -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). diff --git a/gcc/ada/libgnarl/s-taprop__vxworks.adb b/gcc/ada/libgnarl/s-taprop__vxworks.adb index a87d1a0..2b98833 100644 --- a/gcc/ada/libgnarl/s-taprop__vxworks.adb +++ b/gcc/ada/libgnarl/s-taprop__vxworks.adb @@ -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; --------------- diff --git a/gcc/ada/libgnarl/s-vxwext.ads b/gcc/ada/libgnarl/s-vxwext.ads index 1c9847f..8497d2c 100644 --- a/gcc/ada/libgnarl/s-vxwext.ads +++ b/gcc/ada/libgnarl/s-vxwext.ads @@ -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 diff --git a/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb b/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb index ea1f71c..8c91c45 100644 --- a/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb +++ b/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb @@ -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; --------------- diff --git a/gcc/ada/libgnarl/s-vxwext__kernel.adb b/gcc/ada/libgnarl/s-vxwext__kernel.adb index 4743540..7d3cc8d 100644 --- a/gcc/ada/libgnarl/s-vxwext__kernel.adb +++ b/gcc/ada/libgnarl/s-vxwext__kernel.adb @@ -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 -- diff --git a/gcc/ada/libgnarl/s-vxwext__kernel.ads b/gcc/ada/libgnarl/s-vxwext__kernel.ads index 6cecf18..57ce053 100644 --- a/gcc/ada/libgnarl/s-vxwext__kernel.ads +++ b/gcc/ada/libgnarl/s-vxwext__kernel.ads @@ -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 diff --git a/gcc/ada/libgnarl/s-vxwext__rtp-smp.adb b/gcc/ada/libgnarl/s-vxwext__rtp-smp.adb index 241a8f5..8061c37 100644 --- a/gcc/ada/libgnarl/s-vxwext__rtp-smp.adb +++ b/gcc/ada/libgnarl/s-vxwext__rtp-smp.adb @@ -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; ----------------------- diff --git a/gcc/ada/libgnarl/s-vxwext__rtp.adb b/gcc/ada/libgnarl/s-vxwext__rtp.adb index f188ff8..65511b0 100644 --- a/gcc/ada/libgnarl/s-vxwext__rtp.adb +++ b/gcc/ada/libgnarl/s-vxwext__rtp.adb @@ -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; ----------------------- diff --git a/gcc/ada/libgnarl/s-vxwext__rtp.ads b/gcc/ada/libgnarl/s-vxwext__rtp.ads index d955c9c..70dfcbc 100644 --- a/gcc/ada/libgnarl/s-vxwext__rtp.ads +++ b/gcc/ada/libgnarl/s-vxwext__rtp.ads @@ -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 -- 2.7.4