]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix minor issues
authorRonan Desplanques <desplanques@adacore.com>
Thu, 12 Feb 2026 10:59:07 +0000 (11:59 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 May 2026 08:38:24 +0000 (10:38 +0200)
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.

gcc/ada/libgnarl/s-interr.adb
gcc/ada/rtsfind.adb

index d3f1fa1b7dc918a1059846a1328e5520b37445c6..6a391c4ccfdcc53082c58326686a0e8a01aaa957 100644 (file)
@@ -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;
 
index 2d72702c0e6f0d1e07226dc82dfb34f600342419..f1f697d2e93e7d1cf7f38ad97e4559bc7fd879d4 100644 (file)
@@ -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);