[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu 14/59] cpus: Change cpu_thread_is_idle() arg
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu 14/59] cpus: Change cpu_thread_is_idle() argument to CPUState |
Date: |
Sun, 9 Jun 2013 21:12:41 +0200 |
It no longer needs CPUArchState.
Signed-off-by: Andreas Färber <address@hidden>
---
cpus.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/cpus.c b/cpus.c
index b2b20c3..fcef422 100644
--- a/cpus.c
+++ b/cpus.c
@@ -62,10 +62,8 @@
static CPUArchState *next_cpu;
-static bool cpu_thread_is_idle(CPUArchState *env)
+static bool cpu_thread_is_idle(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env);
-
if (cpu->stop || cpu->queued_work_first) {
return false;
}
@@ -84,7 +82,7 @@ static bool all_cpu_threads_idle(void)
CPUArchState *env;
for (env = first_cpu; env != NULL; env = env->next_cpu) {
- if (!cpu_thread_is_idle(env)) {
+ if (!cpu_thread_is_idle(ENV_GET_CPU(env))) {
return false;
}
}
@@ -728,7 +726,7 @@ static void qemu_kvm_wait_io_event(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
- while (cpu_thread_is_idle(env)) {
+ while (cpu_thread_is_idle(cpu)) {
qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex);
}
--
1.8.1.4
- [Qemu-devel] [PATCH qom-cpu 09/59] cpus: Simplify hw_error(), (continued)
- [Qemu-devel] [PATCH qom-cpu 09/59] cpus: Simplify hw_error(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 10/59] cpus: Simplify qemu_tcg_wait_io_event() and qemu_tcg_cpu_thread_fn(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 11/59] monitor: Simplify do_inject_mce(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 12/59] gdbstub: Simplify find_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 14/59] cpus: Change cpu_thread_is_idle() argument to CPUState,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-cpu 15/59] cpus: Change qemu_kvm_wait_io_event() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 13/59] cpu: Change cpu_exit() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 17/59] cpus: Change qemu_kvm_init_cpu_signals() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 16/59] kvm: Change kvm_set_signal_mask() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 19/59] kvm: Change kvm_handle_internal_error() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 20/59] kvm: Change kvm_cpu_exec() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 21/59] gdbstub: Set gdb_set_stop_cpu() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 22/59] cpus: Change cpu_handle_guest_debug() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 23/59] cpus: Change qemu_kvm_start_vcpu() argument to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 24/59] cpus: Change qemu_dummy_start_vcpu() argument to CPUState, Andreas Färber, 2013/06/09