mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
cpus-common: move CPU list management to common code
Add a mutex for the CPU list to system emulation, as it will be used to manage safe work. Abstract manipulation of the CPU list in new functions cpu_list_add and cpu_list_remove. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
178f94297a
commit
267f685b8b
9 changed files with 109 additions and 68 deletions
|
@ -544,6 +544,18 @@ static inline int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* cpu_list_add:
|
||||
* @cpu: The CPU to be added to the list of CPUs.
|
||||
*/
|
||||
void cpu_list_add(CPUState *cpu);
|
||||
|
||||
/**
|
||||
* cpu_list_remove:
|
||||
* @cpu: The CPU to be removed from the list of CPUs.
|
||||
*/
|
||||
void cpu_list_remove(CPUState *cpu);
|
||||
|
||||
/**
|
||||
* cpu_reset:
|
||||
* @cpu: The CPU whose state is to be reset.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue