mirror of https://github.com/mgba-emu/mgba.git
Core: Fix some mutex ordering
This commit is contained in:
parent
b5a2f62c88
commit
104d746c1e
|
@ -433,13 +433,13 @@ static THREAD_ENTRY _mCoreThreadRun(void* context) {
|
|||
threadContext->run(threadContext);
|
||||
}
|
||||
}
|
||||
MutexLock(&impl->stateMutex);
|
||||
}
|
||||
|
||||
while (impl->state < mTHREAD_SHUTDOWN) {
|
||||
MutexLock(&impl->stateMutex);
|
||||
if (impl->state < mTHREAD_SHUTDOWN) {
|
||||
impl->state = mTHREAD_SHUTDOWN;
|
||||
MutexUnlock(&impl->stateMutex);
|
||||
}
|
||||
MutexUnlock(&impl->stateMutex);
|
||||
|
||||
if (core->opts.rewindEnable) {
|
||||
mCoreRewindContextDeinit(&impl->rewind);
|
||||
|
|
Loading…
Reference in New Issue