aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb
diff options
context:
space:
mode:
authorDoug Rupp <rupp@adacore.com>2021-07-23 12:00:04 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2021-09-22 15:01:48 +0000
commitab621f4ada197ec99f0b9673271c7accaa7925da (patch)
treef6f21f048efd94c0cc0b9683bb12e207c566be55 /gcc/ada/libgnarl/s-vxwext__kernel-smp.adb
parent3d2226f1730e027808b8f9c17d4f6b7ac1eb7c44 (diff)
downloadgcc-ab621f4ada197ec99f0b9673271c7accaa7925da.zip
gcc-ab621f4ada197ec99f0b9673271c7accaa7925da.tar.gz
gcc-ab621f4ada197ec99f0b9673271c7accaa7925da.tar.bz2
[Ada] VxWorks inconsistent use of return type (STATUS)
gcc/ada/ * libgnarl/s-interr__vxworks.adb (Interfaces.C): Remove as unused. (System.VxWorks.Ext): Import. (System.VxWorks.Ext.STATUS): use type. (STATUS): New subtype. (OK): New constant. (Interrupt_Connector): Return STATUS type vice int. (Interrupt_Connect, Notify_Interrupt, Unbind_Handler, Interrupt_Server_Task): Rename Status to Result. Assert Result = OK. * libgnarl/s-osinte__vxworks.adb (To_Clock_Ticks): Define constant IERR, and return it vice ERROR. (Binary_Semaphore_Delete): Return STATUS type vice int. (Binary_Semaphore_Obtain): Likewise. (Binary_Semaphore_Release): Likewise. (Binary_Semaphore_Flush): Likewise. * libgnarl/s-osinte__vxworks.ads (SVE): Renaming of System.VxWorks.Ext. (STATUS): Use SVE in declaration of subtype. (BOOL): Likewise. (vx_freq_t): Likewise. (t_id): Likewise. (gitpid): Use SVE in renaming of subprogram (Task_Stop): Likewise. (Task_Cont): Likewise. (Int_Lock): Likewise. (Int_Unlock): Likewise. (Set_Time_Slice): Likewise. (semDelete): Likewise. (taskCpuAffinitySet): Likewise. (taskMaskAffinitySet): Likewise. (sigset_t): Use SVE in declaration of type. (OK): Remove as unused. (ERROR): Likewise. (taskOptionsGet): return STATUS vice int. (taskSuspend): Likewise. (taskResume): Likewise. (taskDelay): Likewise. (taskVarAdd): Likewise. (taskVarDelete): Likewise. (taskVarSet): Likewise. (tlkKeyCreate): Likewise. (taskPrioritySet): Likewise. (semGive): Likewise. (semTake): Likewise. (Binary_Semaphore_Delete): Likewise. (Binary_Semaphore_Obtain): Likewise. (Binary_Semaphore_Release): Likewise. (Binary_Semaphore_Flush): Likewise. (Interrupt_Connect): Likewise. * libgnarl/s-taprop__vxworks.adb (System.VxWorks.Ext.STATUS): use type. (int): Syntactically align subtype. (STATUS): New subtype. (OK): New constant. (Finalize_Lock): Check STATUS vice int. Assert OK. (Finalize_Lock): Likewise. (Write_Lock): Likewise. (Write_Lock): Likewise. (Write_Lock): Likewise. (Unlock): Likewise. (Unlock): Likewise. (Unlock): Likewise. (Unlock): Likewise. (Sleep): Likewise. (Sleep): Likewise. (Sleep): Likewise. (Timed_Sleep): Likewise and test Result. (Timed_Delay): Likewise and test Result. (Wakeup): Likewise. (Yield): Likewise. (Finalize_TCB): Likewise. (Suspend_Until_True): Check OK. (Stop_All_Tasks): Declare Dummy STATUS vice in. Check OK. (Is_Task_Context): Use OSI renaming. (Initialize): Use STATUS vice int. * libgnarl/s-vxwext.adb (IERR): Renamed from ERROR. (taskCpuAffinitySet): Return IERR (int). (taskMaskAffinitySet): Likewise. * libgnarl/s-vxwext.ads (STATUS): New subtype. (OK): New STATUS constant. (ERROR): Likewise. * libgnarl/s-vxwext__kernel-smp.adb (IERR): Renamed from ERROR. (Int_Lock): Return IERR. (semDelete): Return STATUS. (Task_Cont): Likewise. (Task_Stop): Likewise. * libgnarl/s-vxwext__kernel.adb (IERR): Renamed from ERROR. (semDelete): Return STATUS. (Task_Cont): Likewise. (Task_Stop): Likewise. (taskCpuAffinitySet): Return IERR (int) (taskMaskAffinitySet): Likewise. * libgnarl/s-vxwext__kernel.ads (STATUS): New subtype. (OK): New STATUS constant. (ERROR): Likewise. (Interrupt_Connect): Return STATUS (semDelete): Likewise. (Task_Cont): Likewise. (Task_Stop): Likewise. (Set_Time_Slice): Likewise. * libgnarl/s-vxwext__rtp-smp.adb (IERR): Renamed from ERROR. (Int_Lock): return IERR constant vice ERROR. (Interrupt_Connect): Return STATUS. (semDelete): Likewise. (Set_Time_Slice): Likewise. * libgnarl/s-vxwext__rtp.adb (IERR): Renamed from ERROR. (Int_Lock): return IERR constant vice ERROR. (Int_Unlock): Return STATUS. (semDelete): Likewise. (Set_Time_Slice): Likewise. (taskCpuAffinitySet): Return IERR (int) (taskMaskAffinitySet): Likewise. * libgnarl/s-vxwext__rtp.ads (STATUS): New subtype. (OK): New STATUS constant. (ERROR): Likewise. (Interrupt_Connect): Return STATUS (semDelete): Likewise. (Task_Cont): Likewise. (Task_Stop): Likewise. (Set_Time_Slice): Likewise.
Diffstat (limited to 'gcc/ada/libgnarl/s-vxwext__kernel-smp.adb')
-rw-r--r--gcc/ada/libgnarl/s-vxwext__kernel-smp.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb b/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb
index 8c91c45..b78e078 100644
--- a/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb
+++ b/gcc/ada/libgnarl/s-vxwext__kernel-smp.adb
@@ -33,7 +33,7 @@
package body System.VxWorks.Ext is
- ERROR : constant := -1;
+ IERR : constant := -1;
--------------
-- Int_Lock --
@@ -41,7 +41,7 @@ package body System.VxWorks.Ext is
function Int_Lock return int is
begin
- return ERROR;
+ return IERR;
end Int_Lock;
----------------
@@ -58,8 +58,8 @@ package body System.VxWorks.Ext is
-- semDelete --
---------------
- function semDelete (Sem : SEM_ID) return int is
- function Os_Sem_Delete (Sem : SEM_ID) return int;
+ function semDelete (Sem : SEM_ID) return STATUS is
+ function Os_Sem_Delete (Sem : SEM_ID) return STATUS;
pragma Import (C, Os_Sem_Delete, "semDelete");
begin
return Os_Sem_Delete (Sem);
@@ -92,8 +92,8 @@ package body System.VxWorks.Ext is
-- Task_Cont --
---------------
- function Task_Cont (tid : t_id) return int is
- function taskCont (tid : t_id) return int;
+ function Task_Cont (tid : t_id) return STATUS is
+ function taskCont (tid : t_id) return STATUS;
pragma Import (C, taskCont, "taskCont");
begin
return taskCont (tid);
@@ -103,8 +103,8 @@ package body System.VxWorks.Ext is
-- Task_Stop --
---------------
- function Task_Stop (tid : t_id) return int is
- function taskStop (tid : t_id) return int;
+ function Task_Stop (tid : t_id) return STATUS is
+ function taskStop (tid : t_id) return STATUS;
pragma Import (C, taskStop, "taskStop");
begin
return taskStop (tid);