On Wed Oct 15 06:26:43 2025 +0000, Rémi Bernon wrote:
Could you detail a bit more why it would need that? I think recursive locks are a sign that things are getting out of control and it would be better to remove the need for recursive locking instead.
There is a scenario where the function call sequence in the same thread is: window_surface_lock() → lock_surface() → unlock_surface() → window_surface_unlock(). In this situation, window_surface_lock() is called first to acquire a lock. When lock_surface() is subsequently called to acquire the same lock, the initial lock has not yet been released, ultimately resulting in a deadlock.