diff --git a/Utilities/mutex.h b/Utilities/mutex.h index 4c09431096..9ae83767c7 100644 --- a/Utilities/mutex.h +++ b/Utilities/mutex.h @@ -28,6 +28,11 @@ class shared_mutex final public: constexpr shared_mutex() = default; + const atomic_t& raw() const + { + return m_value; + } + bool try_lock_shared() { const u32 value = m_value.load(); diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp index 27323bc671..3598e91944 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp @@ -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)