pragma Task_Dispatching_Policy(FIFO_Within_Priorities); with Ada.Real_Time; use Ada.Real_Time; -- with Rtl_Pt1; -- use Rtl_Pt1; procedure Prior6tasks is task T1 is pragma Priority(10); end T1; task T2 is pragma Priority(11); end T2; task T3 is pragma Priority(12); end T3; task T4 is pragma Priority(13); end T4; task T5 is pragma Priority(14); end T5; task T6 is pragma Priority(15); end T6; task body T1 is Next : Time; Period : Time_Span := Milliseconds (5); Next_While : Time; Period_While : Time_Span:= Microseconds(100); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T1; task body T2 is Next : Time; Period : Time_Span := Milliseconds (5); Next_While : Time; Period_While : Time_Span:= Microseconds(200); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T2; task body T3 is Next : Time; Period : Time_Span := Milliseconds (8); Next_While : Time; Period_While : Time_Span:= Microseconds(500); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T3; task body T4 is Next : Time; Period : Time_Span := Milliseconds (1); Next_While : Time; Period_While : Time_Span:= Microseconds(10); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T4; task body T5 is Next : Time; Period : Time_Span := Milliseconds (2); Next_While : Time; Period_While : Time_Span:= Microseconds(30); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T5; task body T6 is Next : Time; Period : Time_Span := Milliseconds (10); Next_While : Time; Period_While : Time_Span:= Milliseconds(1); begin Next := Clock + Period; loop Next_While := Clock + Period_While; while Next_While > Clock loop null; end loop; delay until Next; Next := Next + Period; end loop; end T6; -- Res : Integer; begin -- Res := Integer (Rtl_Ktrace_Start); delay 0.5; -- Res := Integer (Rtl_Ktrace_Stop); end Prior6tasks;