mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
LV2: Race condition fixup
This commit is contained in:
parent
f58b418b7d
commit
caf81f1367
5 changed files with 5 additions and 0 deletions
|
@ -524,6 +524,7 @@ error_code sys_event_queue_receive(ppu_thread& ppu, u32 equeue_id, vm::ptr<sys_e
|
|||
if (!atomic_storage<ppu_thread*>::load(queue->pq))
|
||||
{
|
||||
// Waiters queue is empty, so the thread must have been signaled
|
||||
queue->mutex.lock_unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -243,6 +243,7 @@ error_code sys_event_flag_wait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, vm
|
|||
if (!atomic_storage<ppu_thread*>::load(flag->sq))
|
||||
{
|
||||
// Waiters queue is empty, so the thread must have been signaled
|
||||
flag->mutex.lock_unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,6 +237,7 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
|||
if (!mutex->load_sq())
|
||||
{
|
||||
// Sleep queue is empty, so the thread must have been signaled
|
||||
mutex->mutex.lock_unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -258,6 +258,7 @@ error_code sys_mutex_lock(ppu_thread& ppu, u32 mutex_id, u64 timeout)
|
|||
if (!atomic_storage<ppu_thread*>::load(mutex->control.raw().sq))
|
||||
{
|
||||
// Waiters queue is empty, so the thread must have been signaled
|
||||
mutex->mutex.lock_unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -199,6 +199,7 @@ error_code sys_rwlock_rlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout)
|
|||
if (!atomic_storage<ppu_thread*>::load(rwlock->rq))
|
||||
{
|
||||
// Waiters queue is empty, so the thread must have been signaled
|
||||
rwlock->mutex.lock_unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue