From 765c5f6985b7d83d763ae29d6d42e2a5559cd526 Mon Sep 17 00:00:00 2001 From: hsc Date: Tue, 3 Jul 2012 12:38:24 +0000 Subject: [PATCH] fix restore() in case no "natural" async_events occur git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1410 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- simulators/bochs/cpu/cpu.cc | 2 +- src/core/sal/bochs/BochsController.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/simulators/bochs/cpu/cpu.cc b/simulators/bochs/cpu/cpu.cc index 65a10e69..4e68859b 100644 --- a/simulators/bochs/cpu/cpu.cc +++ b/simulators/bochs/cpu/cpu.cc @@ -134,7 +134,7 @@ void BX_CPU_C::cpu_loop(Bit32u max_instr_count) } // DanceOS #ifdef DANCEOS_RESTORE - else if(fail::restore_bochs_request) { + if (fail::restore_bochs_request) { return; } #endif diff --git a/src/core/sal/bochs/BochsController.cc b/src/core/sal/bochs/BochsController.cc index 77156c06..91fe7174 100644 --- a/src/core/sal/bochs/BochsController.cc +++ b/src/core/sal/bochs/BochsController.cc @@ -151,6 +151,7 @@ void BochsController::save(const std::string& path) // TODO: (Non-)Verbose-Mode? Log-level? Maybe better: use return value to indicate failure? save_bochs_request = true; + BX_CPU(0)->async_event |= 1; sr_path = path; m_CurrFlow = m_Flows.getCurrent(); m_Flows.resume(); @@ -166,6 +167,7 @@ void BochsController::restore(const std::string& path) { clearEvents(); restore_bochs_request = true; + BX_CPU(0)->async_event |= 1; sr_path = path; m_CurrFlow = m_Flows.getCurrent(); m_Flows.resume();