From 1ab385604669206c3874218ae1471d66561a54c8 Mon Sep 17 00:00:00 2001 From: gingold Date: Tue, 22 Jul 2008 01:27:07 +0000 Subject: Remove timeout at the end of a wait statement. --- translate/grt/grt-processes.adb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/translate/grt/grt-processes.adb b/translate/grt/grt-processes.adb index de76174da..650c0f005 100644 --- a/translate/grt/grt-processes.adb +++ b/translate/grt/grt-processes.adb @@ -298,6 +298,8 @@ package body Grt.Processes is -- Cur_Proc.Timeout := Std_Time'Last; -- end if; Stack_Switch (Get_Main_Stack, Proc.Stack); + -- Note: in case of timeout, the timeout is removed when processis is + -- woken up. return Proc.State = State_Timeout; end Ghdl_Process_Wait_Suspend; @@ -307,6 +309,7 @@ package body Grt.Processes is El : Sensitivity_Acc; N_El : Sensitivity_Acc; begin + -- Remove the sensitivity. El := Proc.Sensitivity; Proc.Sensitivity := null; while El /= null loop @@ -314,6 +317,8 @@ package body Grt.Processes is Free (El); El := N_El; end loop; + -- Remove the timeout. + Proc.Timeout := Bad_Time; end Ghdl_Process_Wait_Close; procedure Ghdl_Process_Wait_Exit -- cgit v1.2.3