From 376692b9dc6f02303ee07a4146d08d8727d79c0c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 10 Jul 2015 12:32:32 +0200 Subject: cpus: protect work list with work_mutex Protect the list of queued work items with something other than the BQL, as a preparation for running the work items outside it. Reviewed-by: Peter Maydell Signed-off-by: KONRAD Frederic Signed-off-by: Paolo Bonzini --- qom/cpu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'qom/cpu.c') diff --git a/qom/cpu.c b/qom/cpu.c index 02b56f7..3841f0d 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -316,6 +316,7 @@ static void cpu_common_initfn(Object *obj) cpu->cpu_index = -1; cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs; + qemu_mutex_init(&cpu->work_mutex); QTAILQ_INIT(&cpu->breakpoints); QTAILQ_INIT(&cpu->watchpoints); } -- cgit v1.1