diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-01 16:04:35 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-04 14:43:45 +0200 |
commit | dd0b228552e4b1d3b680ff4e8033a110536fdc4c (patch) | |
tree | c4986c5ee24263841ce71cbaa0e90832d416402f | |
parent | 6bb8f2c51b28ce35c83ac4e53bbd85ef37d787c4 (diff) | |
download | qemu-dd0b228552e4b1d3b680ff4e8033a110536fdc4c.zip qemu-dd0b228552e4b1d3b680ff4e8033a110536fdc4c.tar.gz qemu-dd0b228552e4b1d3b680ff4e8033a110536fdc4c.tar.bz2 |
accel/tcg: Unregister the RCU before exiting RR thread
Although unreachable, still unregister the RCU before exiting
the thread, as documented in "qemu/rcu.h":
/*
* Important !
*
* Each thread containing read-side critical sections must be registered
* with rcu_register_thread() before calling rcu_read_lock().
* rcu_unregister_thread() should be called before the thread exits.
*/
Unregister the RCU to be on par with what is done for other
accelerators.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250702185332.43650-66-philmd@linaro.org>
-rw-r--r-- | accel/tcg/tcg-accel-ops-rr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 6eec5c9..a578698 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -302,6 +302,8 @@ static void *rr_cpu_thread_fn(void *arg) rr_deal_with_unplugged_cpus(); } + rcu_unregister_thread(); + g_assert_not_reached(); } |