mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 22:41:25 +12:00
PPU/reservations: send thread notification only if data changed
This commit is contained in:
parent
b6bfde6d64
commit
103b2fe5fd
1 changed files with 9 additions and 9 deletions
|
@ -3481,17 +3481,17 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
|
||||||
{
|
{
|
||||||
extern atomic_t<u32> liblv2_begin, liblv2_end;
|
extern atomic_t<u32> liblv2_begin, liblv2_end;
|
||||||
|
|
||||||
const u32 notify = ppu.res_notify;
|
|
||||||
|
|
||||||
if (notify)
|
|
||||||
{
|
|
||||||
vm::reservation_notifier(notify).notify_all();
|
|
||||||
ppu.res_notify = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Avoid notifications from lwmutex or sys_spinlock
|
// Avoid notifications from lwmutex or sys_spinlock
|
||||||
if (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end)
|
if (new_data != old_data && (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end))
|
||||||
{
|
{
|
||||||
|
const u32 notify = ppu.res_notify;
|
||||||
|
|
||||||
|
if (notify)
|
||||||
|
{
|
||||||
|
vm::reservation_notifier(notify).notify_all();
|
||||||
|
ppu.res_notify = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!notify)
|
if (!notify)
|
||||||
{
|
{
|
||||||
// Try to postpone notification to when PPU is asleep or join notifications on the same address
|
// Try to postpone notification to when PPU is asleep or join notifications on the same address
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue