GBA Thread: Wakeup audio condition if trying to interrupt the thread to avoid a deadlock
Jeffrey Pfau jeffrey@endrift.com
Sat, 08 Nov 2014 03:49:20 -0800
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-thread.c
→
src/gba/gba-thread.c
@@ -427,6 +427,9 @@
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) {