diff options
author | Andreas Färber <afaerber@suse.de> | 2013-05-26 23:21:08 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-28 13:25:12 +0200 |
commit | a98ae1d8f5ee09694c148b1787e02205ee908b53 (patch) | |
tree | 48cf7bb8a3c0075e7a634d495776dd884fcd5225 /cpus.c | |
parent | 60a3e17a469e444a7bc4d9a14c2ecf3bdb5ec094 (diff) | |
download | qemu-a98ae1d8f5ee09694c148b1787e02205ee908b53.tar.gz qemu-a98ae1d8f5ee09694c148b1787e02205ee908b53.tar.bz2 qemu-a98ae1d8f5ee09694c148b1787e02205ee908b53.zip |
cpus: Change cpu_thread_is_idle() argument to CPUState
It no longer needs CPUArchState.
Prepares for changing all_cpu_threads_idle() CPU loop to CPUState and
needed for changing qemu_kvm_wait_io_event() argument to CPUState.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } } @@ -723,7 +721,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); } |