diff mbox series

[PULL,09/33] softmmu/cpus: Code movement

Message ID 20220306130000.8104-10-philippe.mathieu.daude@gmail.com
State New
Headers show
Series [PULL,01/33] accel: Restrict sysemu stubs to system emulation | expand

Commit Message

Philippe Mathieu-Daudé March 6, 2022, 12:59 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

We want cpu_thread_is_idle() to use cpus_accel, so declare this
variable earlier.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-10-f4bug@amsat.org>
---
 softmmu/cpus.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 3f8fae43ba6..ac6bec56038 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;