mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Fix sys_lwmutex_lock for SYS_SYNC_RETRY
This commit is contained in:
parent
b8452d29d6
commit
1e5f6ba39c
1 changed files with 3 additions and 3 deletions
|
@ -144,7 +144,7 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
||||||
{
|
{
|
||||||
if (s32 signal = mutex.lv2_control.fetch_op([](auto& data)
|
if (s32 signal = mutex.lv2_control.fetch_op([](auto& data)
|
||||||
{
|
{
|
||||||
if (data.signaled == 1)
|
if (data.signaled)
|
||||||
{
|
{
|
||||||
data.signaled = 0;
|
data.signaled = 0;
|
||||||
return true;
|
return true;
|
||||||
|
@ -153,7 +153,7 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
||||||
return false;
|
return false;
|
||||||
}).first.signaled)
|
}).first.signaled)
|
||||||
{
|
{
|
||||||
if (signal == smin)
|
if (~signal & 1)
|
||||||
{
|
{
|
||||||
ppu.gpr[3] = CELL_EBUSY;
|
ppu.gpr[3] = CELL_EBUSY;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ error_code _sys_lwmutex_lock(ppu_thread& ppu, u32 lwmutex_id, u64 timeout)
|
||||||
|
|
||||||
if (s32 signal = mutex.try_own(&ppu))
|
if (s32 signal = mutex.try_own(&ppu))
|
||||||
{
|
{
|
||||||
if (signal == smin)
|
if (~signal & 1)
|
||||||
{
|
{
|
||||||
ppu.gpr[3] = CELL_EBUSY;
|
ppu.gpr[3] = CELL_EBUSY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue