RSX: use cache-line waits for event queue draining

This commit is contained in:
Malcolm
2026-10-06 09:03:01 +02:00
committed by Megamouse
parent 2ff18d0fae
commit 183597deea
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -28,6 +28,11 @@ class shared_mutex final
public:
constexpr shared_mutex() = default;
const atomic_t<u32>& raw() const
{
return m_value;
}
bool try_lock_shared()
{
const u32 value = m_value.load();
+1 -2
View File
@@ -245,8 +245,7 @@ void _sys_rsx_drain_event_queue(rsx::thread* rsxthr, u64 event_flags = umax, u64
break;
}
// Wait
thread_ctrl::wait_for(100);
utils::spin_on_cacheline_once(queue->mutex.raw(), 0u, 100);
// Check for timeout
if (wait_timeout_ms == umax)