mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
@@ -302,6 +302,8 @@ static void *rr_cpu_thread_fn(void *arg)
|
||||
rr_deal_with_unplugged_cpus();
|
||||
}
|
||||
|
||||
rcu_unregister_thread();
|
||||
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user