--  An interrupt handler (G8): a protected procedure attached to SIGUSR1, which the main
--  subprogram sends to its own process; the handler counts it and opens the entry it waits on.
with Ada.Interrupts.Names;
package Alarms is
   protected Alarm with Interrupt_Priority => 98 is
      procedure Handle with Attach_Handler => Ada.Interrupts.Names.SIGUSR1;
      entry Wait (Count : out Natural);
   private
      Seen : Natural := 0;
      Signalled : Boolean := False;
   end Alarm;
end Alarms;
