diff options
| author | bunnei <bunneidev@gmail.com> | 2018-08-12 22:05:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-12 22:05:48 -0400 |
| commit | ef0065ee51b65d71696cb5f2db159285c73b9d21 (patch) | |
| tree | 7ae20333761b95790d6d263539f8607084982b38 /src/core/core_cpu.cpp | |
| parent | d9a4224dba6bfb7aa446b46c28865f950ef69b28 (diff) | |
| parent | 42d6bbcb7ca4abf7c90764eff1e501091b322695 (diff) | |
Merge pull request #1042 from Subv/races
Fixed a bunch of race conditions when running in multicore mode.
Diffstat (limited to 'src/core/core_cpu.cpp')
| -rw-r--r-- | src/core/core_cpu.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 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(); } |
