diff mbox series

[5/7] cpus: Constify cpu_is_stopped() argument

Message ID 20250120061310.81368-6-philmd@linaro.org (mailing list archive)
State New
Headers show
Series cpus: Constify some CPUState arguments | expand

Commit Message

Philippe Mathieu-Daudé Jan. 20, 2025, 6:13 a.m. UTC
CPUState structure is not modified, make it const.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/core/cpu.h | 2 +-
 system/cpus.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 04fede0e69a..00c16081396 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -857,7 +857,7 @@  void qemu_cpu_kick(CPUState *cpu);
  * Returns: %true if run state is not running or if artificially stopped;
  * %false otherwise.
  */
-bool cpu_is_stopped(CPUState *cpu);
+bool cpu_is_stopped(const CPUState *cpu);
 
 /**
  * do_run_on_cpu:
diff --git a/system/cpus.c b/system/cpus.c
index e4910d670cf..5ea124aed0b 100644
--- a/system/cpus.c
+++ b/system/cpus.c
@@ -73,7 +73,7 @@  static QemuMutex bql;
  */
 static const AccelOpsClass *cpus_accel;
 
-bool cpu_is_stopped(CPUState *cpu)
+bool cpu_is_stopped(const CPUState *cpu)
 {
     return cpu->stopped || !runstate_is_running();
 }