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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CPUState structure is not modified, make it const.

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

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();
 }
-- 
2.47.1





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux