joe@petsd.UUCP (Joe Orost) (12/12/84)
<> #!/bin/sh cat >idle1.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head is entry give; end head; task link1 is entry give; end link1; task idle1 is entry init; entry never; end idle1; task body head is begin idle1.init; put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 10000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; accept give do null; end give; end loop; put_line("ended"); end head; task body link1 is begin loop accept give do null; end give; if printon then put_line("link1"); end if; head.give; end loop; end link1; task body idle1 is begin accept init do put_line("idle1"); end init; accept never do null; end never; end idle1; begin null; end test; ------ EOF ------ ls -l idle1.ada cat >idle10.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head is entry give; end head; task link1 is entry give; end link1; task idle1 is entry init; entry never; end idle1; task idle2 is entry init; entry never; end idle2; task idle3 is entry init; entry never; end idle3; task idle4 is entry init; entry never; end idle4; task idle5 is entry init; entry never; end idle5; task idle11 is entry init; entry never; end idle11; task idle12 is entry init; entry never; end idle12; task idle13 is entry init; entry never; end idle13; task idle14 is entry init; entry never; end idle14; task idle15 is entry init; entry never; end idle15; task body head is begin idle1.init; idle2.init; idle3.init; idle4.init; idle5.init; idle11.init; idle12.init; idle13.init; idle14.init; idle15.init; put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 10000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; accept give do null; end give; end loop; put_line("ended"); end head; task body link1 is begin loop accept give do null; end give; if printon then put_line("link1"); end if; head.give; end loop; end link1; task body idle1 is begin accept init do put_line("idle1"); end init; accept never do null; end never; end idle1; task body idle2 is begin accept init do put_line("idle2"); end init; accept never do null; end never; end idle2; task body idle3 is begin accept init do put_line("idle3"); end init; accept never do null; end never; end idle3; task body idle4 is begin accept init do put_line("idle4"); end init; accept never do null; end never; end idle4; task body idle5 is begin accept init do put_line("idle5"); end init; accept never do null; end never; end idle5; task body idle11 is begin accept init do put_line("idle11"); end init; accept never do null; end never; end idle11; task body idle12 is begin accept init do put_line("idle12"); end init; accept never do null; end never; end idle12; task body idle13 is begin accept init do put_line("idle13"); end init; accept never do null; end never; end idle13; task body idle14 is begin accept init do put_line("idle14"); end init; accept never do null; end never; end idle14; task body idle15 is begin accept init do put_line("idle15"); end init; accept never do null; end never; end idle15; begin null; end test; ------ EOF ------ ls -l idle10.ada cat >idle20.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head is entry give; end head; task link1 is entry give; end link1; task idle1 is entry init; entry never; end idle1; task idle2 is entry init; entry never; end idle2; task idle3 is entry init; entry never; end idle3; task idle4 is entry init; entry never; end idle4; task idle5 is entry init; entry never; end idle5; task idle11 is entry init; entry never; end idle11; task idle12 is entry init; entry never; end idle12; task idle13 is entry init; entry never; end idle13; task idle14 is entry init; entry never; end idle14; task idle15 is entry init; entry never; end idle15; task idle21 is entry init; entry never; end idle21; task idle22 is entry init; entry never; end idle22; task idle23 is entry init; entry never; end idle23; task idle24 is entry init; entry never; end idle24; task idle25 is entry init; entry never; end idle25; task idle211 is entry init; entry never; end idle211; task idle212 is entry init; entry never; end idle212; task idle213 is entry init; entry never; end idle213; task idle214 is entry init; entry never; end idle214; task idle215 is entry init; entry never; end idle215; task body head is begin idle1.init; idle2.init; idle3.init; idle4.init; idle5.init; idle11.init; idle12.init; idle13.init; idle14.init; idle15.init; idle21.init; idle22.init; idle23.init; idle24.init; idle25.init; idle211.init; idle212.init; idle213.init; idle214.init; idle215.init; put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 10000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; accept give do null; end give; end loop; put_line("ended"); end head; task body link1 is begin loop accept give do null; end give; if printon then put_line("link1"); end if; head.give; end loop; end link1; task body idle1 is begin accept init do put_line("idle1"); end init; accept never do null; end never; end idle1; task body idle2 is begin accept init do put_line("idle2"); end init; accept never do null; end never; end idle2; task body idle3 is begin accept init do put_line("idle3"); end init; accept never do null; end never; end idle3; task body idle4 is begin accept init do put_line("idle4"); end init; accept never do null; end never; end idle4; task body idle5 is begin accept init do put_line("idle5"); end init; accept never do null; end never; end idle5; task body idle11 is begin accept init do put_line("idle11"); end init; accept never do null; end never; end idle11; task body idle12 is begin accept init do put_line("idle12"); end init; accept never do null; end never; end idle12; task body idle13 is begin accept init do put_line("idle13"); end init; accept never do null; end never; end idle13; task body idle14 is begin accept init do put_line("idle14"); end init; accept never do null; end never; end idle14; task body idle15 is begin accept init do put_line("idle15"); end init; accept never do null; end never; end idle15; task body idle21 is begin accept init do put_line("idle21"); end init; accept never do null; end never; end idle21; task body idle22 is begin accept init do put_line("idle22"); end init; accept never do null; end never; end idle22; task body idle23 is begin accept init do put_line("idle23"); end init; accept never do null; end never; end idle23; task body idle24 is begin accept init do put_line("idle24"); end init; accept never do null; end never; end idle24; task body idle25 is begin accept init do put_line("idle25"); end init; accept never do null; end never; end idle25; task body idle211 is begin accept init do put_line("idle211"); end init; accept never do null; end never; end idle211; task body idle212 is begin accept init do put_line("idle212"); end init; accept never do null; end never; end idle212; task body idle213 is begin accept init do put_line("idle213"); end init; accept never do null; end never; end idle213; task body idle214 is begin accept init do put_line("idle214"); end init; accept never do null; end never; end idle214; task body idle215 is begin accept init do put_line("idle215"); end init; accept never do null; end never; end idle215; begin null; end test; ------ EOF ------ ls -l idle20.ada cat >idle5.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head is entry give; end head; task link1 is entry give; end link1; task idle1 is entry init; entry never; end idle1; task idle2 is entry init; entry never; end idle2; task idle3 is entry init; entry never; end idle3; task idle4 is entry init; entry never; end idle4; task idle5 is entry init; entry never; end idle5; task body head is begin idle1.init; idle2.init; idle3.init; idle4.init; idle5.init; put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 10000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; accept give do null; end give; end loop; put_line("ended"); end head; task body link1 is begin loop accept give do null; end give; if printon then put_line("link1"); end if; head.give; end loop; end link1; task body idle1 is begin accept init do put_line("idle1"); end init; accept never do null; end never; end idle1; task body idle2 is begin accept init do put_line("idle2"); end init; accept never do null; end never; end idle2; task body idle3 is begin accept init do put_line("idle3"); end init; accept never do null; end never; end idle3; task body idle4 is begin accept init do put_line("idle4"); end init; accept never do null; end never; end idle4; task body idle5 is begin accept init do put_line("idle5"); end init; accept never do null; end never; end idle5; begin null; end test; ------ EOF ------ ls -l idle5.ada cat >moreselctr.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head; task link1 is entry give1; entry give2; entry give3; entry give4; entry give5; entry give6; entry give7; entry give8; entry give9; entry give10; entry give11; entry give12; entry give13; entry give14; entry give15; entry give16; entry give17; entry give18; entry give19; entry give20; end link1; task body head is begin put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 1000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give1; link1.give2; link1.give3; link1.give4; link1.give5; link1.give6; link1.give7; link1.give8; link1.give9; link1.give10; link1.give11; link1.give12; link1.give13; link1.give14; link1.give15; link1.give16; link1.give17; link1.give18; link1.give19; link1.give20; end loop; put_line("ended"); end head; task body link1 is begin loop select accept give20 do null; end give20; or accept give19 do null; end give19; or accept give18 do null; end give18; or accept give17 do null; end give17; or accept give16 do null; end give16; or accept give15 do null; end give15; or accept give14 do null; end give14; or accept give13 do null; end give13; or accept give12 do null; end give12; or accept give11 do null; end give11; or accept give10 do null; end give10; or accept give9 do null; end give9; or accept give8 do null; end give8; or accept give7 do null; end give7; or accept give6 do null; end give6; or accept give5 do null; end give5; or accept give4 do null; end give4; or accept give3 do null; end give3; or accept give2 do null; end give2; or accept give1 do null; end give1; end select; end loop; end link1; begin null; end test; ------ EOF ------ ls -l moreselctr.ada cat >moreselect.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head; task link1 is entry give1; entry give2; entry give3; entry give4; entry give5; entry give6; entry give7; entry give8; entry give9; entry give10; entry give11; entry give12; entry give13; entry give14; entry give15; entry give16; entry give17; entry give18; entry give19; entry give20; end link1; task body head is begin put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 1000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give1; link1.give2; link1.give3; link1.give4; link1.give5; link1.give6; link1.give7; link1.give8; link1.give9; link1.give10; link1.give11; link1.give12; link1.give13; link1.give14; link1.give15; link1.give16; link1.give17; link1.give18; link1.give19; link1.give20; end loop; put_line("ended"); end head; task body link1 is begin loop select accept give1 do null; end give1; or accept give2 do null; end give2; or accept give3 do null; end give3; or accept give4 do null; end give4; or accept give5 do null; end give5; or accept give6 do null; end give6; or accept give7 do null; end give7; or accept give8 do null; end give8; or accept give9 do null; end give9; or accept give10 do null; end give10; or accept give11 do null; end give11; or accept give12 do null; end give12; or accept give13 do null; end give13; or accept give14 do null; end give14; or accept give15 do null; end give15; or accept give16 do null; end give16; or accept give17 do null; end give17; or accept give18 do null; end give18; or accept give19 do null; end give19; or accept give20 do null; end give20; end select; end loop; end link1; begin null; end test; ------ EOF ------ ls -l moreselect.ada cat >moretasks.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head; task link1 is entry give; end link1; task link2 is entry give; end link2; task link3 is entry give; end link3; task link4 is entry give; end link4; task link5 is entry give; end link5; task link6 is entry give; end link6; task link7 is entry give; end link7; task link8 is entry give; end link8; task link9 is entry give; end link9; task link10 is entry give; end link10; task link11 is entry give; end link11; task link12 is entry give; end link12; task link13 is entry give; end link13; task link14 is entry give; end link14; task link15 is entry give; end link15; task link16 is entry give; end link16; task link17 is entry give; end link17; task link18 is entry give; end link18; task link19 is entry give; end link19; task link20 is entry give; end link20; task body head is begin put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 1000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; link2.give; link3.give; link4.give; link5.give; link6.give; link7.give; link8.give; link9.give; link10.give; link11.give; link12.give; link13.give; link14.give; link15.give; link16.give; link17.give; link18.give; link19.give; link20.give; end loop; put_line("ended"); end head; task body link1 is begin loop accept give do null; end give; end loop; end link1; task body link2 is begin loop accept give do null; end give; end loop; end link2; task body link3 is begin loop accept give do null; end give; end loop; end link3; task body link4 is begin loop accept give do null; end give; end loop; end link4; task body link5 is begin loop accept give do null; end give; end loop; end link5; task body link6 is begin loop accept give do null; end give; end loop; end link6; task body link7 is begin loop accept give do null; end give; end loop; end link7; task body link8 is begin loop accept give do null; end give; end loop; end link8; task body link9 is begin loop accept give do null; end give; end loop; end link9; task body link10 is begin loop accept give do null; end give; end loop; end link10; task body link11 is begin loop accept give do null; end give; end loop; end link11; task body link12 is begin loop accept give do null; end give; end loop; end link12; task body link13 is begin loop accept give do null; end give; end loop; end link13; task body link14 is begin loop accept give do null; end give; end loop; end link14; task body link15 is begin loop accept give do null; end give; end loop; end link15; task body link16 is begin loop accept give do null; end give; end loop; end link16; task body link17 is begin loop accept give do null; end give; end loop; end link17; task body link18 is begin loop accept give do null; end give; end loop; end link18; task body link19 is begin loop accept give do null; end give; end loop; end link19; task body link20 is begin loop accept give do null; end give; end loop; end link20; begin null; end test; ------ EOF ------ ls -l moretasks.ada cat >moretasksl.ada <<'------ EOF ------' -- ada tasking tester -- task head is the controller -- tasks link are the chain of tasks -- tasks idle are the standby tasks with text_io; use text_io; procedure test is cycles: integer; printon: boolean; answer: character; task head; task link1 is entry give; end link1; task link2 is entry give; end link2; task link3 is entry give; end link3; task link4 is entry give; end link4; task link5 is entry give; end link5; task link6 is entry give; end link6; task link7 is entry give; end link7; task link8 is entry give; end link8; task link9 is entry give; end link9; task link10 is entry give; end link10; task link11 is entry give; end link11; task link12 is entry give; end link12; task link13 is entry give; end link13; task link14 is entry give; end link14; task link15 is entry give; end link15; task link16 is entry give; end link16; task link17 is entry give; end link17; task link18 is entry give; end link18; task link19 is entry give; end link19; task link20 is entry give; end link20; task body head is begin put("do you want printing (y/n)? "); get(answer); put("answer is "); put(answer); put_line(" "); if answer='y' then printon := true; else printon := false; end if; if printon then put_line("printing on"); else put_line("print off"); end if; put("how many cycles? "); -- doesn't work get_line(cycles); cycles := 1000; put_line("started"); for i in 1..cycles loop if printon then put_line("head"); end if; link1.give; link2.give; link3.give; link4.give; link5.give; link6.give; link7.give; link8.give; link9.give; link10.give; link11.give; link12.give; link13.give; link14.give; link15.give; link16.give; link17.give; link18.give; link19.give; link20.give; end loop; put_line("ended"); end head; task body link1 is begin loop select accept give do null; end give; end select; end loop; end link1; task body link2 is begin loop select accept give do null; end give; end select; end loop; end link2; task body link3 is begin loop select accept give do null; end give; end select; end loop; end link3; task body link4 is begin loop select accept give do null; end give; end select; end loop; end link4; task body link5 is begin loop select accept give do null; end give; end select; end loop; end link5; task body link6 is begin loop select accept give do null; end give; end select; end loop; end link6; task body link7 is begin loop select accept give do null; end give; end select; end loop; end link7; task body link8 is begin loop select accept give do null; end give; end select; end loop; end link8; task body link9 is begin loop select accept give do null; end give; end select; end loop; end link9; task body link10 is begin loop select accept give do null; end give; end select; end loop; end link10; task body link11 is begin loop select accept give do null; end give; end select; end loop; end link11; task body link12 is begin loop select accept give do null; end give; end select; end loop; end link12; task body link13 is begin loop select accept give do null; end give; end select; end loop; end link13; task body link14 is begin loop select accept give do null; end give; end select; end loop; end link14; task body link15 is begin loop select accept give do null; end give; end select; end loop; end link15; task body link16 is begin loop select accept give do null; end give; end select; end loop; end link16; task body link17 is begin loop select accept give do null; end give; end select; end loop; end link17; task body link18 is begin loop select accept give do null; end give; end select; end loop; end link18; task body link19 is begin loop select accept give do null; end give; end select; end loop; end link19; task body link20 is begin loop select accept give do null; end give; end select; end loop; end link20; begin null; end test; ------ EOF ------ ls -l moretasksl.ada