mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Fixup and Improve CELL reservation notifications
This commit is contained in:
parent
6ddb21ab95
commit
33851d51ab
9 changed files with 35 additions and 3 deletions
|
|
@ -3506,16 +3506,30 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
|
|||
|
||||
if (ppu.res_notify_time == (vm::reservation_acquire(notify) & -128))
|
||||
{
|
||||
ppu.state += cpu_flag::wait;
|
||||
vm::reservation_notifier(notify).notify_all();
|
||||
notified = true;
|
||||
}
|
||||
|
||||
if (!notified || (addr ^ notify) & -128)
|
||||
if (get_resrv_waiters_count(addr))
|
||||
{
|
||||
res.notify_all();
|
||||
if (!notified)
|
||||
{
|
||||
ppu.res_notify = addr;
|
||||
ppu.res_notify_time = rtime + 128;
|
||||
}
|
||||
else if ((addr ^ notify) & -128)
|
||||
{
|
||||
res.notify_all();
|
||||
ppu.res_notify = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ppu.res_notify = 0;
|
||||
}
|
||||
|
||||
ppu.res_notify = 0;
|
||||
static_cast<void>(ppu.test_stopped());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3546,7 +3560,9 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
|
|||
{
|
||||
if (ppu.res_notify_time == (vm::reservation_acquire(notify) & -128))
|
||||
{
|
||||
ppu.state += cpu_flag::wait;
|
||||
vm::reservation_notifier(notify).notify_all();
|
||||
static_cast<void>(ppu.test_stopped());
|
||||
}
|
||||
|
||||
ppu.res_notify = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue