PPU: Fix potential overflow

This commit is contained in:
Elad Ashkenazi 2024-07-27 09:56:11 +03:00
parent 700334753d
commit 91b4aaf9e1
4 changed files with 6 additions and 6 deletions

View file

@ -92,7 +92,7 @@ void lv2_int_serv::join() const
std::bit_cast<u64>(&ppu_thread_exit) std::bit_cast<u64>(&ppu_thread_exit)
}); });
thread->cmd_notify++; thread->cmd_notify.store(1);
thread->cmd_notify.notify_one(); thread->cmd_notify.notify_one();
(*thread)(); (*thread)();

View file

@ -581,7 +581,7 @@ error_code sys_ppu_thread_start(ppu_thread& ppu, u32 thread_id)
} }
else else
{ {
thread->cmd_notify++; thread->cmd_notify.store(1);
thread->cmd_notify.notify_one(); thread->cmd_notify.notify_one();
} }

View file

@ -933,7 +933,7 @@ namespace rsx
{ ppu_cmd::sleep, 0 } { ppu_cmd::sleep, 0 }
}); });
intr_thread->cmd_notify++; intr_thread->cmd_notify.store(1);
intr_thread->cmd_notify.notify_one(); intr_thread->cmd_notify.notify_one();
} }
} }
@ -3923,7 +3923,7 @@ namespace rsx
{ ppu_cmd::sleep, 0 } { ppu_cmd::sleep, 0 }
}); });
intr_thread->cmd_notify++; intr_thread->cmd_notify.store(1);
intr_thread->cmd_notify.notify_one(); intr_thread->cmd_notify.notify_one();
} }
} }

View file

@ -57,7 +57,7 @@ namespace rsx
{ ppu_cmd::sleep, 0 } { ppu_cmd::sleep, 0 }
}); });
RSX(ctx)->intr_thread->cmd_notify++; RSX(ctx)->intr_thread->cmd_notify.store(1);
RSX(ctx)->intr_thread->cmd_notify.notify_one(); RSX(ctx)->intr_thread->cmd_notify.notify_one();
} }
@ -84,7 +84,7 @@ namespace rsx
{ ppu_cmd::sleep, 0 } { ppu_cmd::sleep, 0 }
}); });
RSX(ctx)->intr_thread->cmd_notify++; RSX(ctx)->intr_thread->cmd_notify.store(1);
RSX(ctx)->intr_thread->cmd_notify.notify_one(); RSX(ctx)->intr_thread->cmd_notify.notify_one();
} }
} }