mirror of https://github.com/mgba-emu/mgba.git
GBA Thread: Wakeup audio condition if trying to interrupt the thread to avoid a deadlock
This commit is contained in:
parent
7cdcdbd7b4
commit
190ea71646
|
@ -427,6 +427,9 @@ void GBAThreadJoin(struct GBAThread* threadContext) {
|
|||
void GBAThreadInterrupt(struct GBAThread* threadContext) {
|
||||
MutexLock(&threadContext->stateMutex);
|
||||
threadContext->savedState = threadContext->state;
|
||||
if (threadContext->sync.audioWait) {
|
||||
ConditionWake(&threadContext->sync.audioRequiredCond);
|
||||
}
|
||||
_waitOnInterrupt(threadContext);
|
||||
threadContext->state = THREAD_INTERRUPTING;
|
||||
if (threadContext->debugger && threadContext->debugger->state == DEBUGGER_RUNNING) {
|
||||
|
|
Loading…
Reference in New Issue