From f74c79478971735c90ec38982e7d8550d6148bcc Mon Sep 17 00:00:00 2001
From: hsc <hsc@8c4709b5-6ec9-48aa-a5cd-a96041d1645a>
Date: Tue, 12 Jun 2012 15:13:15 +0000
Subject: [PATCH] Bochs tweak: properly handle restore() after TimerEvent

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1331 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
---
 simulators/bochs/cpu/cpu.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/simulators/bochs/cpu/cpu.cc b/simulators/bochs/cpu/cpu.cc
index f4c4e169..2131687e 100644
--- a/simulators/bochs/cpu/cpu.cc
+++ b/simulators/bochs/cpu/cpu.cc
@@ -507,6 +507,13 @@ unsigned BX_CPU_C::handleAsyncEvent(void)
 #endif
 
       BX_TICKN(10); // when in HLT run time faster for single CPU
+
+      // DanceOS
+#ifdef DANCEOS_RESTORE
+      if (fail::restore_bochs_request) {			
+        return 1;
+      }
+#endif
     }
   } else if (bx_pc_system.kill_bochs_request) {
     // setting kill_bochs_request causes the cpu loop to return ASAP.
-- 
GitLab