aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-17 19:47:15 +0100
committerAndreas Färber <afaerber@suse.de>2013-01-15 04:09:14 +0100
commit38d8f5c84e7c02f2523005dddc31939ca18232dd (patch)
treeb331156b39565092fe7f860647b912730367ffcd /include/qom
parent4a1e40b5091bcff5f8ea3fe9963eaa8e76b16389 (diff)
exec: Return CPUState from qemu_get_cpu()
Move the declaration to qemu/cpu.h and add documentation. The implementation still depends on CPUArchState for CPU iteration. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/cpu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index d5e0a4057a..773caf9fa1 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -156,5 +156,15 @@ bool cpu_is_stopped(CPUState *cpu);
*/
void run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
+/**
+ * qemu_get_cpu:
+ * @index: The CPUState@cpu_index value of the CPU to obtain.
+ *
+ * Gets a CPU matching @index.
+ *
+ * Returns: The CPU or %NULL if there is no matching CPU.
+ */
+CPUState *qemu_get_cpu(int index);
+
#endif