code-examples/2015/2015_03/ada/sigint_handler.ads

15 lines
380 B
Ada

with Ada.Interrupts; use Ada.Interrupts;
with Ada.Interrupts.Names; use Ada.Interrupts.Names;
package Sigint_Handler is
pragma Unreserve_All_Interrupts;
protected Handler is
entry Wait;
procedure Handle;
pragma Attach_Handler (Handle, Ada.Interrupts.Names.SIGINT);
private
Call_Count : Natural := 0;
end Handler;
end Sigint_Handler;