https://gcc.gnu.org/g:336c86bcdd36c999600452e6fd49579aec313013

commit r17-797-g336c86bcdd36c999600452e6fd49579aec313013
Author: Ronan Desplanques <[email protected]>
Date:   Thu Feb 12 11:59:07 2026 +0100

    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:
---
 gcc/ada/libgnarl/s-interr.adb | 10 ++++------
 gcc/ada/rtsfind.adb           |  3 +--
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/libgnarl/s-interr.adb b/gcc/ada/libgnarl/s-interr.adb
index d3f1fa1b7dc9..6a391c4ccfdc 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 2d72702c0e6f..f1f697d2e93e 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);

Reply via email to