-- ada tasking tester
-- test the effect of an 'in out' parameter size on task performance
-- task head is the controller
-- tasks link are the chain of tasks

with Instrument;
use Instrument;

procedure Taopf1 is

    type Param_Type is array (1 .. 3200) of Integer;
    task Head is
        entry Give;                     --included in control version
        --  entry give(p:in param_type);    --included in test version
    end Head;
    task Link1 is
        entry Give;                     --included in control version
        --  entry give(p:in param_type);    --included in test version
    end Link1;
    task body Head is
        P : Param_Type;
    begin
        Start ("TAOPF1",
               "Task Perf. w/3200 element Array 'in out' Param. (control)");
        for I in 1 .. 10000 loop
            Link1.Give;     --included in control version
            --    link1.give(p);  --included in test version
            accept Give        --included in control version
--        give(p:in param_type) -- inc in test ver
                do
                null;
            end Give;
        end loop;
        Stop;
        abort Link1;
    end Head;
    task body Link1 is
        P : Param_Type;
    begin
        loop
            accept Give         --included in control version
--        give(p:in param_type)  -- inc in test ver
                do
                null;
            end Give;
            Head.Give;       --included in control version
            --    head.give(p);    --included in test version
        end loop;
    end Link1;
begin
    null;
end Taopf1;