mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
sys_lwmutex: add vm::temporary_unlock
This commit is contained in:
parent
b9b591bf02
commit
a935203a18
3 changed files with 26 additions and 16 deletions
|
|
@ -42,7 +42,7 @@ error_code sys_lwmutex_create(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex, v
|
|||
attrs->flags = 0;
|
||||
attrs->name_u64 = attr->name_u64;
|
||||
|
||||
if (error_code res = g_cfg.core.hle_lwmutex ? sys_mutex_create(ppu, out_id, attrs) : _sys_lwmutex_create(out_id, protocol, lwmutex, 0x80000001, attr->name_u64))
|
||||
if (error_code res = g_cfg.core.hle_lwmutex ? sys_mutex_create(ppu, out_id, attrs) : _sys_lwmutex_create(ppu, out_id, protocol, lwmutex, 0x80000001, attr->name_u64))
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ error_code sys_lwmutex_destroy(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex)
|
|||
}
|
||||
|
||||
// call the syscall
|
||||
if (error_code res = _sys_lwmutex_destroy(lwmutex->sleep_queue))
|
||||
if (error_code res = _sys_lwmutex_destroy(ppu, lwmutex->sleep_queue))
|
||||
{
|
||||
// unlock the mutex if failed
|
||||
sys_lwmutex_unlock(ppu, lwmutex);
|
||||
|
|
@ -302,7 +302,7 @@ error_code sys_lwmutex_trylock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex)
|
|||
if (old_owner == lwmutex_reserved)
|
||||
{
|
||||
// should be locked by the syscall
|
||||
const error_code res = _sys_lwmutex_trylock(lwmutex->sleep_queue);
|
||||
const error_code res = _sys_lwmutex_trylock(ppu, lwmutex->sleep_queue);
|
||||
|
||||
if (res == CELL_OK)
|
||||
{
|
||||
|
|
@ -359,7 +359,7 @@ error_code sys_lwmutex_unlock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex)
|
|||
lwmutex->vars.owner.release(lwmutex_free);
|
||||
|
||||
// Call the alternative syscall
|
||||
if (_sys_lwmutex_unlock2(lwmutex->sleep_queue) == CELL_ESRCH)
|
||||
if (_sys_lwmutex_unlock2(ppu, lwmutex->sleep_queue) == CELL_ESRCH)
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue