]> git.proxmox.com Git - qemu.git/blobdiff - include/qom/cpu.h
cpu: Add qemu_for_each_cpu()
[qemu.git] / include / qom / cpu.h
index 1b4de1741544dea71011e078fe70907dc301954b..a28e5ffee2ca292e227e9f667cfcf12061f00677 100644 (file)
@@ -215,6 +215,15 @@ bool cpu_is_stopped(CPUState *cpu);
  */
 void run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
 
+/**
+ * qemu_for_each_cpu:
+ * @func: The function to be executed.
+ * @data: Data to pass to the function.
+ *
+ * Executes @func for each CPU.
+ */
+void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data);
+
 /**
  * qemu_get_cpu:
  * @index: The CPUState@cpu_index value of the CPU to obtain.