mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
LV2: Optimizations and fixes
Fix and optimize sys_ppu_thread_yield Fix LV2 syscalls with timeout bug. (use ppu_thread::cancel_sleep instead) Move timeout notification out of mutex scope Allow g_waiting timeouts to be awaked in scope
This commit is contained in:
parent
cba4c3cdc4
commit
c4cc0154be
10 changed files with 260 additions and 202 deletions
|
@ -162,6 +162,8 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
|||
|
||||
lv2_obj::prepare_for_sleep(ppu);
|
||||
|
||||
ppu.cancel_sleep = 1;
|
||||
|
||||
if (s32 signal = mutex.try_own(&ppu))
|
||||
{
|
||||
if (signal == smin)
|
||||
|
@ -169,12 +171,13 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
|||
ppu.gpr[3] = CELL_EBUSY;
|
||||
}
|
||||
|
||||
ppu.cancel_sleep = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
mutex.sleep(ppu, timeout);
|
||||
const bool finished = !mutex.sleep(ppu, timeout);
|
||||
notify.cleanup();
|
||||
return false;
|
||||
return finished;
|
||||
});
|
||||
|
||||
if (!mutex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue