fixed corner case issue with SMP

This commit is contained in:
Stanislav Shwartsman 2011-07-11 17:29:54 +00:00
parent 901b02eb0d
commit 041605f718

View File

@ -497,7 +497,19 @@ unsigned BX_CPU_C::handleAsyncEvent(void)
}
#endif
// reset will clear pending INIT
BX_CPU_THIS_PTR reset(BX_RESET_SOFTWARE);
reset(BX_RESET_SOFTWARE);
#if BX_SUPPORT_SMP
if (BX_SMP_PROCESSORS > 1) {
// if HALT condition remains, return so other CPUs have a chance
if (BX_CPU_THIS_PTR activity_state) {
#if BX_DEBUGGER
BX_CPU_THIS_PTR stop_reason = STOP_CPU_HALTED;
#endif
return 1; // Return to caller of cpu_loop.
}
}
#endif
}
// Priority 4: Traps on Previous Instruction