From 0c0fcc2052915c629daa2469bfae620da18b2394 Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Fri, 12 Jun 2020 20:02:24 +0100 Subject: cpu: convert queued work to a QSIMPLEQ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-3-robert.foley@linaro.org> Message-Id: <20200612190237.30436-6-alex.bennee@linaro.org> --- hw/core/cpu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw') 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); -- cgit v1.1