mirror of https://github.com/RPCS3/rpcs3.git
sys_cond_wait: Wait for rescheduling before relocking
This commit is contained in:
parent
3317e13b64
commit
35a3bed91a
|
@ -264,6 +264,9 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
|
|||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
// Wait for rescheduling
|
||||
ppu.check_state();
|
||||
|
||||
std::lock_guard lock(cond->mutex->mutex);
|
||||
|
||||
// Try to cancel the waiting
|
||||
|
@ -278,6 +281,8 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
|
|||
{
|
||||
break;
|
||||
}
|
||||
|
||||
cond->mutex->sleep(ppu);
|
||||
}
|
||||
|
||||
timeout = 0;
|
||||
|
|
Loading…
Reference in New Issue