DSP: Change external_interrupt_waiting from volatile to atomic

Making this volatile accomplishes... Well, nothing in practice.
Making it atomic, on the other hand, lets us enforce a memory ordering.
This commit is contained in:
JosJuice committed 2021-05-14 09:28:10 +02:00
1 parent 80ac36a712
commit d17341572d
4 files changed
+7 -6

No files matched your search

@@ -69,10 +69,9 @@ int Interpreter::RunCyclesThread(int cycles)
if ((state.cr & CR_HALT) != 0)
return 0;
if (state.external_interrupt_waiting)
if (state.external_interrupt_waiting.exchange(false, std::memory_order_acquire))
{
m_dsp_core.CheckExternalInterrupt();
m_dsp_core.SetExternalInterrupt(false);
}
Step();