GBA: Replace MutexLock with MutexTryLock in _waitUntilNotState

This commit is contained in:
Jeffrey Pfau 2015-11-12 23:06:41 -08:00
parent 51e9042f62
commit 0a6e2b49ab
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ static void _waitUntilNotState(struct GBAThread* threadContext, enum ThreadState
MutexUnlock(&threadContext->sync.videoFrameMutex); MutexUnlock(&threadContext->sync.videoFrameMutex);
} }
if (!MutexLock(&threadContext->sync.audioBufferMutex)) { if (!MutexTryLock(&threadContext->sync.audioBufferMutex)) {
ConditionWake(&threadContext->sync.audioRequiredCond); ConditionWake(&threadContext->sync.audioRequiredCond);
MutexUnlock(&threadContext->sync.audioBufferMutex); MutexUnlock(&threadContext->sync.audioBufferMutex);
} }