From: Philippe Mathieu-Daudé Date: Thu, 3 Feb 2022 11:51:06 +0000 (+0100) Subject: softmmu/cpus: Code movement X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5f74af8bab3978b766bdf78255079da3b8a1a888;p=qemu.git softmmu/cpus: Code movement We want cpu_thread_is_idle() to use cpus_accel, so declare this variable earlier. Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220207075426.81934-10-f4bug@amsat.org> --- diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 3f8fae43ba..ac6bec5603 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -67,6 +67,11 @@ static QemuMutex qemu_global_mutex; +/* + * The chosen accelerator is supposed to register this. + */ +static const AccelOpsClass *cpus_accel; + bool cpu_is_stopped(CPUState *cpu) { return cpu->stopped || !runstate_is_running(); @@ -122,11 +127,6 @@ void hw_error(const char *fmt, ...) abort(); } -/* - * The chosen accelerator is supposed to register this. - */ -static const AccelOpsClass *cpus_accel; - void cpu_synchronize_all_states(void) { CPUState *cpu;