mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
lv2: Wait for rescheduling before confirming ETIMEOUT
This commit is contained in:
parent
35a3bed91a
commit
a921fe3351
@ -292,6 +292,9 @@ error_code sys_event_queue_receive(ppu_thread& ppu, u32 equeue_id, vm::ptr<sys_e
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(queue->mutex);
|
||||
|
||||
if (!queue->unqueue(queue->sq, &ppu))
|
||||
|
@ -171,6 +171,9 @@ error_code sys_event_flag_wait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, vm
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(flag->mutex);
|
||||
|
||||
if (!flag->unqueue(flag->sq, &ppu))
|
||||
|
@ -325,6 +325,9 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(cond->mutex);
|
||||
|
||||
if (!cond->unqueue(cond->sq, &ppu))
|
||||
|
@ -130,6 +130,9 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(mutex->mutex);
|
||||
|
||||
if (!mutex->unqueue(mutex->sq, &ppu))
|
||||
|
@ -165,6 +165,9 @@ error_code sys_mutex_lock(ppu_thread& ppu, u32 mutex_id, u64 timeout)
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(mutex->mutex);
|
||||
|
||||
if (!mutex->unqueue(mutex->sq, &ppu))
|
||||
|
@ -140,6 +140,9 @@ error_code sys_rwlock_rlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout)
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(rwlock->mutex);
|
||||
|
||||
if (!rwlock->unqueue(rwlock->rq, &ppu))
|
||||
@ -337,6 +340,9 @@ error_code sys_rwlock_wlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout)
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(rwlock->mutex);
|
||||
|
||||
if (!rwlock->unqueue(rwlock->wq, &ppu))
|
||||
|
@ -131,6 +131,9 @@ error_code sys_semaphore_wait(ppu_thread& ppu, u32 sem_id, u64 timeout)
|
||||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(sem->mutex);
|
||||
|
||||
if (!sem->unqueue(sem->sq, &ppu))
|
||||
|
Loading…
Reference in New Issue
Block a user