diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 1a714fc8..ae0264ed 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -431,13 +431,16 @@ void CMiniDexed::Run (unsigned nCore) m_CoreStatus[nCore] = CoreStatusIdle; // core 1 ready // wait for cores 2 and 3 to be ready + DisableIRQs (); for (unsigned nCore = 2; nCore < CORES; nCore++) { while (m_CoreStatus[nCore] != CoreStatusIdle) { - // just wait + DataSyncBarrier (); + WaitForInterrupt (); } } + EnableIRQs (); while (m_CoreStatus[nCore] != CoreStatusExit) { @@ -449,10 +452,15 @@ void CMiniDexed::Run (unsigned nCore) while (1) { m_CoreStatus[nCore] = CoreStatusIdle; // ready to be kicked + SendIPI (1, IPI_USER); + + DisableIRQs (); while (m_CoreStatus[nCore] == CoreStatusIdle) { - // just wait + DataSyncBarrier (); + WaitForInterrupt (); } + EnableIRQs (); // now kicked from core 1 @@ -1230,6 +1238,7 @@ void CMiniDexed::ProcessSound (void) { assert (m_CoreStatus[nCore] == CoreStatusIdle); m_CoreStatus[nCore] = CoreStatusBusy; + SendIPI (nCore, IPI_USER); } // process the TGs assigned to core 1 @@ -1241,13 +1250,16 @@ void CMiniDexed::ProcessSound (void) } // wait for cores 2 and 3 to complete their work + DisableIRQs (); for (unsigned nCore = 2; nCore < CORES; nCore++) { while (m_CoreStatus[nCore] != CoreStatusIdle) { - // just wait + DataSyncBarrier (); + WaitForInterrupt (); } } + EnableIRQs (); // // Audio signal path after tone generators starts here