diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-08-28 03:45:14 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-27 11:57:29 +0200 |
commit | 267f685b8b20784c97251618b515fcd17b42aad6 (patch) | |
tree | 7a746297b582988b5f8b69ec2ba3a2c1abbcd634 /include/qom | |
parent | 178f94297a23e68183ce08bb841cf5d209208b03 (diff) |
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>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/cpu.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 4aa9e61c5d..ea3233ff5b 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -545,6 +545,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. */ |