mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
cpu_interrupt_handler: Make is_interrupted an atomic
Fixes a race condition detected from tsan
This commit is contained in:
parent
ce74cce2ea
commit
7eb6cc742a
2 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
namespace Common {
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
void AwaitInterrupt();
|
||||
|
||||
private:
|
||||
bool is_interrupted{};
|
||||
std::atomic_bool is_interrupted{false};
|
||||
std::unique_ptr<Common::Event> interrupt_event;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue