From: Ronan Desplanques Date: Thu, 12 Feb 2026 10:59:07 +0000 (+0100) Subject: ada: Fix minor issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=336c86bcdd36c999600452e6fd49579aec313013;p=thirdparty%2Fgcc.git ada: Fix minor issues The task state for interrupt server tasks was not quite right for unhandled tasks. This fixes that and makes a few comment and formatting improvements. gcc/ada/ChangeLog: * libgnarl/s-interr.adb (Unprotected_Exchange_Handler): Improve comment and formatting. (Server_Task): Fix task state. * rtsfind.adb (RTE): Remove incorrect comment. --- diff --git a/gcc/ada/libgnarl/s-interr.adb b/gcc/ada/libgnarl/s-interr.adb index d3f1fa1b7dc..6a391c4ccfd 100644 --- a/gcc/ada/libgnarl/s-interr.adb +++ b/gcc/ada/libgnarl/s-interr.adb @@ -846,12 +846,10 @@ package body System.Interrupts is is begin if User_Entry (Interrupt).T /= Null_Task then + -- If an entry is attached to the interrupt (See RM J.7.1), raise + -- Program_Error. - -- In case we have an Interrupt Entry already installed, raise a - -- program error, (propagate it to the caller). - - raise Program_Error with - "an interrupt is already installed"; + raise Program_Error with "an interrupt is already installed"; end if; -- Note : A null handler with Static = True will pass the following @@ -1279,7 +1277,7 @@ package body System.Interrupts is -- No Interrupt binding. If there is an interrupt, -- Interrupt_Manager will take default action. - Self_ID.Common.State := Interrupt_Server_Blocked_Interrupt_Sleep; + Self_ID.Common.State := Interrupt_Server_Idle_Sleep; POP.Sleep (Self_ID, Interrupt_Server_Idle_Sleep); Self_ID.Common.State := Runnable; diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb index 2d72702c0e6..f1f697d2e93 100644 --- a/gcc/ada/rtsfind.adb +++ b/gcc/ada/rtsfind.adb @@ -1577,8 +1577,7 @@ package body Rtsfind is if Nkind (Lib_Unit) = N_Subprogram_Declaration then RE_Table (E) := U.Entity; - -- Otherwise we must have the package case. First check package - -- entity itself (e.g. RTE_Name for System.Interrupts.Name) + -- Otherwise we must have the package case else pragma Assert (Nkind (Lib_Unit) = N_Package_Declaration);