mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
a37677c32b
commit
69e5ff067a
2 changed files with 36 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue