]> git.proxmox.com Git - mirror_qemu.git/commit - cpus-common.c
cpus-common: move exclusive work infrastructure from linux-user
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 31 Aug 2016 14:56:04 +0000 (16:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Sep 2016 09:57:30 +0000 (11:57 +0200)
commitab129972c8b41e15b0521895a46fd9c752b68a5e
tree2333219f1b6366ad23aa0b1e3ffa9c9ee2d5c0fe
parent0e55539c076a61b0b10a1aea1158fc20fb159d99
cpus-common: move exclusive work infrastructure from linux-user

This will serve as the base for async_safe_run_on_cpu.  Because
start_exclusive uses CPU_FOREACH, merge exclusive_lock with
qemu_cpu_list_lock: together with a call to exclusive_idle (via
cpu_exec_start/end) in cpu_list_add, this protects exclusive work
against concurrent CPU addition and removal.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
bsd-user/main.c
cpus-common.c
cpus.c
include/qom/cpu.h
linux-user/main.c