Skip to content

Commit

Permalink
suspend processors while waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
soyersoyer committed Jan 6, 2025
1 parent b0e8f55 commit b063c93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/minidexed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ void CMiniDexed::Run (unsigned nCore)
while (m_CoreStatus[nCore] != CoreStatusIdle)
{
// just wait
WaitForInterrupt ();
}
}

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -1245,6 +1249,7 @@ void CMiniDexed::ProcessSound (void)
{
while (m_CoreStatus[nCore] != CoreStatusIdle)
{
WaitForInterrupt ();
// just wait
}
}
Expand Down

0 comments on commit b063c93

Please sign in to comment.