mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-11 22:49:55 +00:00
RSX: use cache-line waits for event queue draining
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user