瀏覽代碼

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.
Subv 8 年之前
父節點
當前提交
2e7802ad7d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/core_cpu.h

+ 1 - 1
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;
 };