]> git.proxmox.com Git - qemu.git/blobdiff - cpus.c
QMP: Introduce commands documentation
[qemu.git] / cpus.c
diff --git a/cpus.c b/cpus.c
index af87007d48ee9a6ecb0d843f799072cd322004d0..8341f6c201be07d941f21d6830ec4ed2c87530d0 100644 (file)
--- a/cpus.c
+++ b/cpus.c
@@ -91,6 +91,11 @@ void cpu_synchronize_all_post_init(void)
     }
 }
 
+int cpu_is_stopped(CPUState *env)
+{
+    return !vm_running || env->stopped;
+}
+
 static void do_vm_stop(int reason)
 {
     if (vm_running) {
@@ -142,7 +147,7 @@ static int io_thread_fd = -1;
 static void qemu_event_increment(void)
 {
     /* Write 8 bytes to be compatible with eventfd.  */
-    static uint64_t val = 1;
+    static const uint64_t val = 1;
     ssize_t ret;
 
     if (io_thread_fd == -1)