summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-08-13 00:50:44 +0200
committerSubv <subv2112@gmail.com>2018-08-13 01:41:11 +0200
commit3a338d9286bb7c8a4e169914965e6241c466bc6a (patch)
tree3d973bb9e44e08a979fed6d42a5169abad1ddc34
parentKernel/Threads: Lock the HLE mutex when executing the wakeup callback. (diff)
downloadyuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar.gz
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar.bz2
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar.lz
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar.xz
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.tar.zst
yuzu-3a338d9286bb7c8a4e169914965e6241c466bc6a.zip
-rw-r--r--src/core/core_cpu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp
index 46a522fcd..9b306faf6 100644
--- a/src/core/core_cpu.cpp
+++ b/src/core/core_cpu.cpp
@@ -14,6 +14,7 @@
#include "core/core_timing.h"
#include "core/hle/kernel/scheduler.h"
#include "core/hle/kernel/thread.h"
+#include "core/hle/lock.h"
#include "core/settings.h"
namespace Core {
@@ -125,6 +126,8 @@ void Cpu::Reschedule() {
}
reschedule_pending = false;
+ // Lock the global kernel mutex when we manipulate the HLE state
+ std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock);
scheduler->Reschedule();
}