mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
LV2: Optimization for timeout
This commit is contained in:
parent
cec976b70a
commit
f58b418b7d
5 changed files with 30 additions and 0 deletions
|
|
@ -255,6 +255,12 @@ error_code sys_mutex_lock(ppu_thread& ppu, u32 mutex_id, u64 timeout)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!atomic_storage<ppu_thread*>::load(mutex->control.raw().sq))
|
||||
{
|
||||
// Waiters queue is empty, so the thread must have been signaled
|
||||
break;
|
||||
}
|
||||
|
||||
std::lock_guard lock(mutex->mutex);
|
||||
|
||||
bool success = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue