diff options
author | Emilio G. Cota <cota@braap.org> | 2020-06-12 20:02:24 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-06-16 14:49:05 +0100 |
commit | 0c0fcc2052915c629daa2469bfae620da18b2394 (patch) | |
tree | 6dc8bbff4b256c6706333ef6515a39a624e79a43 /hw/core | |
parent | 0aebab04b9289bd37017593b413ce7a762b54c55 (diff) |
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/core')
-rw-r--r-- | hw/core/cpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/cpu.c b/hw/core/cpu.c index f31ec48ee6..80d51c24dd 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); |