From b063c930eb8fec4e8efc10fee40b1962c701f836 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Fri, 3 Jan 2025 03:00:00 +0100 Subject: [PATCH] suspend processors while waiting --- src/minidexed.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 1a714fc..a464968 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -436,6 +436,7 @@ void CMiniDexed::Run (unsigned nCore) while (m_CoreStatus[nCore] != CoreStatusIdle) { // just wait + WaitForInterrupt (); } } @@ -449,9 +450,11 @@ void CMiniDexed::Run (unsigned nCore) while (1) { m_CoreStatus[nCore] = CoreStatusIdle; // ready to be kicked + SendIPI (1, IPI_USER); while (m_CoreStatus[nCore] == CoreStatusIdle) { // just wait + WaitForInterrupt (); } // now kicked from core 1 @@ -1230,6 +1233,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 @@ -1245,6 +1249,7 @@ void CMiniDexed::ProcessSound (void) { while (m_CoreStatus[nCore] != CoreStatusIdle) { + WaitForInterrupt (); // just wait } }