diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-11-17 19:07:11 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-01-04 16:20:01 -0800 |
commit | 2fc4f9f3ff2362d4436476087fb13ad26fd2814a (patch) | |
tree | e09fde95cf1327daec2a4886b1c7b4bb3483728e /target | |
parent | 6fa8c46e55f1ef141b188563e914c46957ce163c (diff) | |
download | qemu-2fc4f9f3ff2362d4436476087fb13ad26fd2814a.zip qemu-2fc4f9f3ff2362d4436476087fb13ad26fd2814a.tar.gz qemu-2fc4f9f3ff2362d4436476087fb13ad26fd2814a.tar.bz2 |
target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_interrupt
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/ppc/excp_helper.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index add4d54..287659c 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -2163,22 +2163,13 @@ static int ppc_next_unmasked_interrupt(CPUPPCState *env) void ppc_maybe_interrupt(CPUPPCState *env) { CPUState *cs = env_cpu(env); - bool locked = false; - - if (!qemu_mutex_iothread_locked()) { - locked = true; - qemu_mutex_lock_iothread(); - } + QEMU_IOTHREAD_LOCK_GUARD(); if (ppc_next_unmasked_interrupt(env)) { cpu_interrupt(cs, CPU_INTERRUPT_HARD); } else { cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD); } - - if (locked) { - qemu_mutex_unlock_iothread(); - } } #if defined(TARGET_PPC64) |