diff mbox series

[v2,09/21] softmmu/cpus: Code movement

Message ID 20220203191814.45023-10-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series softmmu: Make various objects target agnostic | expand

Commit Message

Philippe Mathieu-Daudé Feb. 3, 2022, 7:18 p.m. UTC
We want cpu_thread_is_idle() to use cpus_accel, so declare this
variable earlier.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 softmmu/cpus.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Richard Henderson Feb. 5, 2022, 11:16 p.m. UTC | #1
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote:
> We want cpu_thread_is_idle() to use cpus_accel, so declare this
> variable earlier.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   softmmu/cpus.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 7f15106dd9..538e1714af 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -66,6 +66,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();
@@ -126,11 +131,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;