all repos — mgba @ 0a6e2b49ab3cc40b7ba4752d47e04ed9a13b7192

mGBA Game Boy Advance Emulator

GBA: Replace MutexLock with MutexTryLock in _waitUntilNotState
Jeffrey Pfau jeffrey@endrift.com
Thu, 12 Nov 2015 23:06:41 -0800
commit

0a6e2b49ab3cc40b7ba4752d47e04ed9a13b7192

parent

51e9042f626917a7b05f4df4150200bce2bee274

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

jump to
M src/gba/supervisor/thread.csrc/gba/supervisor/thread.c

@@ -76,7 +76,7 @@ ConditionWake(&threadContext->sync.videoFrameRequiredCond);

MutexUnlock(&threadContext->sync.videoFrameMutex); } - if (!MutexLock(&threadContext->sync.audioBufferMutex)) { + if (!MutexTryLock(&threadContext->sync.audioBufferMutex)) { ConditionWake(&threadContext->sync.audioRequiredCond); MutexUnlock(&threadContext->sync.audioBufferMutex); }