aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 4d9db0145c..19e11b2f70 100644
--- a/vl.c
+++ b/vl.c
@@ -3591,9 +3591,14 @@ void qemu_cpu_kick(void *_env)
qemu_thread_signal(env->thread, SIGUSR1);
}
-int qemu_cpu_self(void *env)
+int qemu_cpu_self(void *_env)
{
- return (cpu_single_env != NULL);
+ CPUState *env = _env;
+ QemuThread this;
+
+ qemu_thread_self(&this);
+
+ return qemu_thread_equal(&this, env->thread);
}
static void cpu_signal(int sig)