mirror of https://github.com/RPCS3/rpcs3.git
sys_cond/lwcond: Fix waiting time in the debugger for mutex lock
This commit is contained in:
parent
f0002501f7
commit
bc8bf2c329
|
@ -416,6 +416,8 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
|
|||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
const u64 start_time = ppu.start_time;
|
||||
|
||||
// Wait for rescheduling
|
||||
if (ppu.check_state())
|
||||
{
|
||||
|
@ -442,6 +444,7 @@ error_code sys_cond_wait(ppu_thread& ppu, u32 cond_id, u64 timeout)
|
|||
}
|
||||
|
||||
cond->mutex->sleep(ppu);
|
||||
ppu.start_time = start_time; // Restore start time because awake has been called
|
||||
timeout = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -443,6 +443,8 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id
|
|||
{
|
||||
if (lv2_obj::wait_timeout(timeout, &ppu))
|
||||
{
|
||||
const u64 start_time = ppu.start_time;
|
||||
|
||||
// Wait for rescheduling
|
||||
if (ppu.check_state())
|
||||
{
|
||||
|
@ -476,6 +478,7 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id
|
|||
}
|
||||
|
||||
mutex->sleep(ppu);
|
||||
ppu.start_time = start_time; // Restore start time because awake has been called
|
||||
timeout = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue