suspend processors while waiting

pull/782/head
Gergo Koteles 3 months ago
parent b0e8f55601
commit b063c930eb
  1. 5
      src/minidexed.cpp

@ -436,6 +436,7 @@ void CMiniDexed::Run (unsigned nCore)
while (m_CoreStatus[nCore] != CoreStatusIdle) while (m_CoreStatus[nCore] != CoreStatusIdle)
{ {
// just wait // just wait
WaitForInterrupt ();
} }
} }
@ -449,9 +450,11 @@ void CMiniDexed::Run (unsigned nCore)
while (1) while (1)
{ {
m_CoreStatus[nCore] = CoreStatusIdle; // ready to be kicked m_CoreStatus[nCore] = CoreStatusIdle; // ready to be kicked
SendIPI (1, IPI_USER);
while (m_CoreStatus[nCore] == CoreStatusIdle) while (m_CoreStatus[nCore] == CoreStatusIdle)
{ {
// just wait // just wait
WaitForInterrupt ();
} }
// now kicked from core 1 // now kicked from core 1
@ -1230,6 +1233,7 @@ void CMiniDexed::ProcessSound (void)
{ {
assert (m_CoreStatus[nCore] == CoreStatusIdle); assert (m_CoreStatus[nCore] == CoreStatusIdle);
m_CoreStatus[nCore] = CoreStatusBusy; m_CoreStatus[nCore] = CoreStatusBusy;
SendIPI (nCore, IPI_USER);
} }
// process the TGs assigned to core 1 // process the TGs assigned to core 1
@ -1245,6 +1249,7 @@ void CMiniDexed::ProcessSound (void)
{ {
while (m_CoreStatus[nCore] != CoreStatusIdle) while (m_CoreStatus[nCore] != CoreStatusIdle)
{ {
WaitForInterrupt ();
// just wait // just wait
} }
} }

Loading…
Cancel
Save