aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 01:41:24 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 01:02:44 +0100
commitc3586ba73fd4523a38c658f730cc38ec17b60491 (patch)
treef0e826ff4b6c9432639bea3351e8f35988407570 /cpus.c
parentf5c121b85832f69fde5ad8939274e04ad21c1bd6 (diff)
cpus: Pass CPUState to qemu_tcg_cpu_thread_fn
CPUArchState is no longer needed except for iterating the CPUs. Needed for qemu_tcg_init_vcpu(). KVM and dummy threads still need CPUArchState for cpu_single_env. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpus.c b/cpus.c
index 5a80bfa984..068fa12287 100644
--- a/cpus.c
+++ b/cpus.c
@@ -815,8 +815,8 @@ static void tcg_exec_all(void);
static void *qemu_tcg_cpu_thread_fn(void *arg)
{
- CPUArchState *env = arg;
- CPUState *cpu = ENV_GET_CPU(env);
+ CPUState *cpu = arg;
+ CPUArchState *env;
qemu_tcg_init_cpu_signals();
qemu_thread_get_self(cpu->thread);
@@ -1002,7 +1002,7 @@ static void qemu_tcg_init_vcpu(void *_env)
cpu->halt_cond = g_malloc0(sizeof(QemuCond));
qemu_cond_init(cpu->halt_cond);
tcg_halt_cond = cpu->halt_cond;
- qemu_thread_create(cpu->thread, qemu_tcg_cpu_thread_fn, env,
+ qemu_thread_create(cpu->thread, qemu_tcg_cpu_thread_fn, cpu,
QEMU_THREAD_JOINABLE);
#ifdef _WIN32
cpu->hThread = qemu_thread_get_handle(cpu->thread);