accel/tcg: Add cpu_in_serial_context
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 26 Oct 2022 04:58:09 +0000 (14:58 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 11 May 2023 08:53:41 +0000 (09:53 +0100)
commit9877ea05de9cdce6a5da87175d8455832f8148dc
tree3d029b208685f8f3cd79c3fe756270a8daf1b4c2
parent1fceff9c3ca5960748f7346b3cd75e9d2620eaed
accel/tcg: Add cpu_in_serial_context

Like cpu_in_exclusive_context, but also true if
there is no other cpu against which we could race.

Use it in tb_flush as a direct replacement.
Use it in cpu_loop_exit_atomic to ensure that there
is no loop against cpu_exec_step_atomic.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cpu-exec-common.c
accel/tcg/internal.h
accel/tcg/tb-maint.c