aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2013-04-25 16:05:24 +0200
committerAndreas Färber <afaerber@suse.de>2013-05-01 13:04:18 +0200
commit69e5ff067ae724155fd7465119ee6db5721288b6 (patch)
tree61f6bad7b182abc129904155a7d27f47d118a8d3 /include/qom
parenta37677c32bb313f5ba48aaf89f81cdc10c23ce56 (diff)
downloadqemu-69e5ff067ae724155fd7465119ee6db5721288b6.zip
qemu-69e5ff067ae724155fd7465119ee6db5721288b6.tar.gz
qemu-69e5ff067ae724155fd7465119ee6db5721288b6.tar.bz2
cpu: Add helper cpu_exists(), to check if CPU with specified id exists
Signed-off-by: Igor Mammedov <imammedo@redhat.com> 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 a28e5ff..e54579b 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -234,6 +234,16 @@ void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data);
*/
CPUState *qemu_get_cpu(int index);
+/**
+ * cpu_exists:
+ * @id: Guest-exposed CPU ID to lookup.
+ *
+ * Search for CPU with specified ID.
+ *
+ * Returns: %true - CPU is found, %false - CPU isn't found.
+ */
+bool cpu_exists(int64_t id);
+
#ifndef CONFIG_USER_ONLY
typedef void (*CPUInterruptHandler)(CPUState *, int);