mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 07:14:49 +00:00
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…
x
Reference in New Issue
Block a user