Patchwork [qom-cpu,v2,4/7] cpus: Pass CPUState to qemu_cpu_is_self()

login
register
mail settings
Submitter Andreas Färber
Date Oct. 30, 2012, 8:33 p.m.
Message ID <509039A2.6050009@suse.de>
Download mbox | patch
Permalink /patch/195619/
State New
Headers show

Comments

Andreas Färber - Oct. 30, 2012, 8:33 p.m.
Am 12.10.2012 03:26, schrieb Andreas Färber:
> Change return type to bool, move to include/qemu/cpu.h and
> add documentation.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Applied to qom-cpu branch with the following build fix:



Andreas

Patch

diff --git a/cpus.c b/cpus.c
index 3b1bfec..1f3ac91 100644
--- a/cpus.c
+++ b/cpus.c
@@ -898,7 +898,7 @@  bool qemu_cpu_is_self(CPUState *cpu)

 static bool qemu_in_vcpu_thread(void)
 {
-    return cpu_single_env && qemu_cpu_is_self(cpu_single_env);
+    return cpu_single_env && qemu_cpu_is_self(ENV_GET_CPU(cpu_single_env));
 }

 void qemu_mutex_lock_iothread(void)