summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 02:18:09 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 01:02:45 +0100
commit509a0d78c7c3927b9ec8e176abef09ddd28ff0b3 (patch)
tree16a6ad1575e752e8d988a62efdbd880e1ceffffa /cpus.c
parent6d45b109a6869084abd0f9aba01fa5107e926b60 (diff)
downloadqemu-509a0d78c7c3927b9ec8e176abef09ddd28ff0b3.tar.gz
qemu-509a0d78c7c3927b9ec8e176abef09ddd28ff0b3.tar.bz2
qemu-509a0d78c7c3927b9ec8e176abef09ddd28ff0b3.zip
cpus: Pass CPUState to qemu_wait_io_event_common()
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/cpus.c b/cpus.c
index e40823c6f1..6baf2bcb35 100644
--- a/cpus.c
+++ b/cpus.c
@@ -687,10 +687,8 @@ static void flush_queued_work(CPUState *cpu)
qemu_cond_broadcast(&qemu_work_cond);
}
-static void qemu_wait_io_event_common(CPUArchState *env)
+static void qemu_wait_io_event_common(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env);
-
if (cpu->stop) {
cpu->stop = false;
cpu->stopped = true;
@@ -716,7 +714,7 @@ static void qemu_tcg_wait_io_event(void)
}
for (env = first_cpu; env != NULL; env = env->next_cpu) {
- qemu_wait_io_event_common(env);
+ qemu_wait_io_event_common(ENV_GET_CPU(env));
}
}
@@ -729,7 +727,7 @@ static void qemu_kvm_wait_io_event(CPUArchState *env)
}
qemu_kvm_eat_signals(env);
- qemu_wait_io_event_common(env);
+ qemu_wait_io_event_common(cpu);
}
static void *qemu_kvm_cpu_thread_fn(void *arg)
@@ -804,7 +802,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
}
qemu_mutex_lock_iothread();
cpu_single_env = env;
- qemu_wait_io_event_common(env);
+ qemu_wait_io_event_common(cpu);
}
return NULL;
@@ -836,7 +834,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
/* process any pending work */
for (env = first_cpu; env != NULL; env = env->next_cpu) {
- qemu_wait_io_event_common(env);
+ qemu_wait_io_event_common(ENV_GET_CPU(env));
}
}