From 2e7802ad7d4ab80d9547c3ee44ad3a1341dea625 Mon Sep 17 00:00:00 2001
From: Subv <subv2112@gmail.com>
Date: Sun, 12 Aug 2018 17:51:47 -0500
Subject: [PATCH] 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.
---
 src/core/core_cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
index 9769529033..56cdae1947 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -79,7 +79,7 @@ private:
     std::shared_ptr<CpuBarrier> cpu_barrier;
     std::shared_ptr<Kernel::Scheduler> scheduler;
 
-    bool reschedule_pending{};
+    std::atomic<bool> reschedule_pending = false;
     size_t core_index;
 };
 
-- 
GitLab