pragma Task_Dispatching_Policy (FIFO_Within_Priorities); pragma Locking_Policy (Ceiling_Locking); -- with RTL_Pt1; -- use RTL_Pt1; with Ada.Real_Time; use Ada.Real_Time; procedure Protobj is task T1 is pragma Priority (16); end T1; task T2 is pragma Priority (17); end T2; protected Obj is procedure Write; end Obj; protected body Obj is procedure Write is Next : Time; Period : Time_Span := Microseconds (300); begin Next := Clock + Period; while Next > Clock loop null; end loop; end Write; end obj; task body T1 is Next : Time; Period : Time_Span := Microseconds (750); begin Next := Clock + Period; loop Obj.Write; delay until Next; Next := Next + Period; end loop; end T1; task body T2 is Next : Time; Period : Time_Span := Milliseconds (1); 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; Obj.Write; delay until Next; Next := Next + Period; end loop; end T2; -- Res : Integer; begin -- Res := Integer(Rtl_Ktrace_Start); delay 0.5; -- Res := Integer(Rtl_Ktrace_Stop); end Protobj;