PPU/reservations: send thread notification only if data changed
This commit is contained in:
@@ -3481,6 +3481,9 @@ 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;
|
||||||
|
|
||||||
|
// Avoid notifications from lwmutex or sys_spinlock
|
||||||
|
if (new_data != old_data && (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end))
|
||||||
|
{
|
||||||
const u32 notify = ppu.res_notify;
|
const u32 notify = ppu.res_notify;
|
||||||
|
|
||||||
if (notify)
|
if (notify)
|
||||||
@@ -3489,9 +3492,6 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
|
|||||||
ppu.res_notify = 0;
|
ppu.res_notify = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid notifications from lwmutex or sys_spinlock
|
|
||||||
if (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end)
|
|
||||||
{
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user