diff mbox series

[6/7] cpus: Constify cpu_work_list_empty() argument

Message ID 20250120061310.81368-7-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/system/cpus.h | 2 +-
 system/cpus.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/system/cpus.h b/include/system/cpus.h
index 3d8fd368f32..3a364fe61b4 100644
--- a/include/system/cpus.h
+++ b/include/system/cpus.h
@@ -20,7 +20,7 @@  void dummy_start_vcpu_thread(CPUState *);
 #define VCPU_THREAD_NAME_SIZE 16
 
 void cpus_kick_thread(CPUState *cpu);
-bool cpu_work_list_empty(CPUState *cpu);
+bool cpu_work_list_empty(const CPUState *cpu);
 bool cpu_thread_is_idle(CPUState *cpu);
 bool all_cpu_threads_idle(void);
 bool cpu_can_run(CPUState *cpu);
diff --git a/system/cpus.c b/system/cpus.c
index 5ea124aed0b..68add85bdc7 100644
--- a/system/cpus.c
+++ b/system/cpus.c
@@ -78,7 +78,7 @@  bool cpu_is_stopped(const CPUState *cpu)
     return cpu->stopped || !runstate_is_running();
 }
 
-bool cpu_work_list_empty(CPUState *cpu)
+bool cpu_work_list_empty(const CPUState *cpu)
 {
     return QSIMPLEQ_EMPTY_ATOMIC(&cpu->work_list);
 }