summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv2018-08-12 17:51:47 -0500
committerGravatar Subv2018-08-12 18:41:12 -0500
commit2e7802ad7d4ab80d9547c3ee44ad3a1341dea625 (patch)
treefa4e31e2fe542c263f68a6395cd8e4e150eda799 /src/core
parentCPU/HLE: Lock the HLE mutex before performing a reschedule. (diff)
downloadyuzu-2e7802ad7d4ab80d9547c3ee44ad3a1341dea625.tar.gz
yuzu-2e7802ad7d4ab80d9547c3ee44ad3a1341dea625.tar.xz
yuzu-2e7802ad7d4ab80d9547c3ee44ad3a1341dea625.zip
Core/HLE: Make the 'reschedule_pending' flag atomic.
Another thread may write to this variable while the core in question is in the middle of checking for a reschedule request.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
index 976952903..56cdae194 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -79,7 +79,7 @@ private:
79 std::shared_ptr<CpuBarrier> cpu_barrier; 79 std::shared_ptr<CpuBarrier> cpu_barrier;
80 std::shared_ptr<Kernel::Scheduler> scheduler; 80 std::shared_ptr<Kernel::Scheduler> scheduler;
81 81
82 bool reschedule_pending{}; 82 std::atomic<bool> reschedule_pending = false;
83 size_t core_index; 83 size_t core_index;
84}; 84};
85 85