all repos — mgba @ 190ea7164666202ebae534511e5890b2238141b6

mGBA Game Boy Advance Emulator

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
commit

190ea7164666202ebae534511e5890b2238141b6

parent

7cdcdbd7b4631485e6c1acd00535e8f3c1151293

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-thread.csrc/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) {