VERY experimental Nintendo Switch 2 emulator
C++
CPU/HLE: Lock the HLE mutex before performing a reschedule.
Subvc51eb8b679b9
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cppindex 46a522fcd4..9b306faf6a 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();}