-- ada tasking tester
-- task head is the controller
-- tasks link are the chain of tasks

with Instrument;
use Instrument;

procedure Tptca2 is
    task Head is
        entry Give;
    end Head;
    task Link1 is
        entry Give;
    end Link1;
    task body Head is
    begin
        Start ("TPTCA2", "Task Perf., Task Chain, lenght 1 (test)");
        for I in 1 .. 1000 loop
            Link1.Give;
            accept Give do
                null;
            end Give;
        end loop;
        Stop;
        abort Link1;
    end Head;
    task body Link1 is
    begin
        loop
            accept Give do
                null;
            end Give;
            Head.Give;
        end loop;
    end Link1;
begin
    null;
end Tptca2;