aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2020-06-12 20:02:24 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-06-16 14:49:05 +0100
commit0c0fcc2052915c629daa2469bfae620da18b2394 (patch)
tree6dc8bbff4b256c6706333ef6515a39a624e79a43 /hw
parent0aebab04b9289bd37017593b413ce7a762b54c55 (diff)
downloadqemu-0c0fcc2052915c629daa2469bfae620da18b2394.zip
qemu-0c0fcc2052915c629daa2469bfae620da18b2394.tar.gz
qemu-0c0fcc2052915c629daa2469bfae620da18b2394.tar.bz2
cpu: convert queued work to a QSIMPLEQ
We convert queued work to a QSIMPLEQ, instead of open-coding it. While at it, make sure that all accesses to the list are performed while holding the list's lock. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Robert Foley <robert.foley@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200609200738.445-3-robert.foley@linaro.org> Message-Id: <20200612190237.30436-6-alex.bennee@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/cpu.c b/hw/core/cpu.c
index f31ec48..80d51c2 100644
--- a/hw/core/cpu.c
+++ b/hw/core/cpu.c
@@ -370,6 +370,7 @@ static void cpu_common_initfn(Object *obj)
cpu->nr_threads = 1;
qemu_mutex_init(&cpu->work_mutex);
+ QSIMPLEQ_INIT(&cpu->work_list);
QTAILQ_INIT(&cpu->breakpoints);
QTAILQ_INIT(&cpu->watchpoints);