Suspend some host threads that make guest callbacks.

This commit is contained in:
Ben Vanik
2015-09-21 21:24:26 -07:00
parent 4c8634bc31
commit 3fc1d02a09
8 changed files with 25 additions and 8 deletions

View File

@@ -305,7 +305,7 @@ bool Emulator::ExceptionCallback(Exception* ex) {
kernel::XObject::kTypeThread);
auto current_thread = kernel::XThread::GetCurrentThread();
for (auto thread : threads) {
if (!thread->is_guest_thread()) {
if (!thread->can_debugger_suspend()) {
// Don't pause host threads.
continue;
}
@@ -325,7 +325,7 @@ bool Emulator::ExceptionCallback(Exception* ex) {
});
// Now suspend ourself (we should be a guest thread).
assert_true(current_thread->is_guest_thread());
assert_true(current_thread->can_debugger_suspend());
current_thread->Suspend(nullptr);
// We should not arrive here!