Comments
Patch
@@ -179,10 +179,10 @@ static void cpu_handle_guest_debug(CPUState *env)
}
#ifdef CONFIG_IOTHREAD
-static void cpu_signal(int sig)
+static inline void do_cpu_kick(CPUState *env)
{
- if (cpu_single_env) {
- cpu_exit(cpu_single_env);
+ if (env) {
+ cpu_exit(env);
}
exit_request = 1;
}
@@ -476,6 +476,13 @@ static void qemu_kvm_init_cpu_signals(CPUState *env)
}
}
+#ifdef CONFIG_IOTHREAD
+static void cpu_signal(int sig)
+{
+ do_cpu_kick(cpu_single_env);
+}
+#endif
+
static void qemu_tcg_init_cpu_signals(void)
{
#ifdef CONFIG_IOTHREAD
@@ -858,7 +865,7 @@ static void qemu_cpu_kick_thread(CPUState *env)
#else /* _WIN32 */
if (!qemu_cpu_is_self(env)) {
SuspendThread(env->thread->thread);
- cpu_signal(0);
+ do_cpu_kick(env);
ResumeThread(env->thread->thread);
}
#endif