Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,14 +0,0 @@
with Ada.Interrupts; use Ada.Interrupts;
with Ada.Interrupts.Names; use Ada.Interrupts.Names;
package Sigint_Handler is
protected Handler is
entry Wait;
procedure Handle;
pragma Interrupt_Handler(Handle);
pragma Attach_Handler(Handle, Sigint);
private
Call_Count : Natural := 0;
end Handler;
end Sigint_Handler;

View file

@ -1,29 +0,0 @@
package body Sigint_Handler is
-------------
-- Handler --
-------------
protected body Handler is
----------
-- Wait --
----------
entry Wait when Call_Count > 0 is
begin
Call_Count := Call_Count - 1;
end Wait;
------------
-- Handle --
------------
procedure Handle is
begin
Call_Count := Call_Count + 1;
end Handle;
end Handler;
end Sigint_Handler;

View file

@ -1,37 +0,0 @@
with Ada.Calendar; use Ada.Calendar;
with Ada.Text_Io; use Ada.Text_Io;
with Sigint_Handler; use Sigint_Handler;
procedure Signals is
task Counter is
entry Stop;
end Counter;
task body Counter is
Current_Count : Natural := 0;
begin
loop
select
accept Stop;
exit;
or delay 0.5;
end select;
Current_Count := Current_Count + 1;
Put_Line(Natural'Image(Current_Count));
end loop;
end Counter;
task Sig_Handler;
task body Sig_Handler is
Start_Time : Time := Clock;
Sig_Time : Time;
begin
Handler.Wait;
Sig_Time := Clock;
Counter.Stop;
Put_Line("Program execution took" & Duration'Image(Sig_Time - Start_Time) & " seconds");
end Sig_Handler;
begin
null;
end Signals;