mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
sys_rwlock_runlock fixed
Registered _sys_rwlock_trywlock
This commit is contained in:
parent
2bc57fbee3
commit
adf119e960
3 changed files with 5 additions and 3 deletions
|
@ -195,7 +195,7 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
|
|||
BIND_FUNC(sys_time_get_current_time), //145 (0x091)
|
||||
null_func,//BIND_FUNC(sys_time_get_system_time), //146 (0x092) ROOT
|
||||
BIND_FUNC(sys_time_get_timebase_frequency), //147 (0x093)
|
||||
null_func,//BIND_FUNC(_sys_rwlock_trywlock) //148 (0x094)
|
||||
BIND_FUNC(_sys_rwlock_trywlock), //148 (0x094)
|
||||
null_func, //149 (0x095) UNS
|
||||
BIND_FUNC(sys_raw_spu_create_interrupt_tag), //150 (0x096)
|
||||
BIND_FUNC(sys_raw_spu_set_int_mask), //151 (0x097)
|
||||
|
|
|
@ -225,9 +225,9 @@ error_code sys_rwlock_runlock(ppu_thread& ppu, u32 rw_lock_id)
|
|||
// Remove one reader
|
||||
const s64 _old = rwlock->owner.fetch_op([](s64& val)
|
||||
{
|
||||
if (val < 0)
|
||||
if (val < -1)
|
||||
{
|
||||
val++;
|
||||
val += 2;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -55,3 +55,5 @@ error_code sys_rwlock_runlock(ppu_thread& ppu, u32 rw_lock_id);
|
|||
error_code sys_rwlock_wlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout);
|
||||
error_code sys_rwlock_trywlock(ppu_thread& ppu, u32 rw_lock_id);
|
||||
error_code sys_rwlock_wunlock(ppu_thread& ppu, u32 rw_lock_id);
|
||||
|
||||
constexpr auto _sys_rwlock_trywlock = sys_rwlock_trywlock;
|
||||
|
|
Loading…
Add table
Reference in a new issue