diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/arm/cpu_interrupt_handler.cpp | 6 | ||||
| -rw-r--r-- | src/core/arm/cpu_interrupt_handler.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/core/arm/cpu_interrupt_handler.cpp b/src/core/arm/cpu_interrupt_handler.cpp index df0350881..9c8898700 100644 --- a/src/core/arm/cpu_interrupt_handler.cpp +++ b/src/core/arm/cpu_interrupt_handler.cpp | |||
| @@ -7,9 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | namespace Core { | 8 | namespace Core { |
| 9 | 9 | ||
| 10 | CPUInterruptHandler::CPUInterruptHandler() : is_interrupted{} { | 10 | CPUInterruptHandler::CPUInterruptHandler() : interrupt_event{std::make_unique<Common::Event>()} {} |
| 11 | interrupt_event = std::make_unique<Common::Event>(); | ||
| 12 | } | ||
| 13 | 11 | ||
| 14 | CPUInterruptHandler::~CPUInterruptHandler() = default; | 12 | CPUInterruptHandler::~CPUInterruptHandler() = default; |
| 15 | 13 | ||
| @@ -17,7 +15,7 @@ void CPUInterruptHandler::SetInterrupt(bool is_interrupted_) { | |||
| 17 | if (is_interrupted_) { | 15 | if (is_interrupted_) { |
| 18 | interrupt_event->Set(); | 16 | interrupt_event->Set(); |
| 19 | } | 17 | } |
| 20 | this->is_interrupted = is_interrupted_; | 18 | is_interrupted = is_interrupted_; |
| 21 | } | 19 | } |
| 22 | 20 | ||
| 23 | void CPUInterruptHandler::AwaitInterrupt() { | 21 | void CPUInterruptHandler::AwaitInterrupt() { |
diff --git a/src/core/arm/cpu_interrupt_handler.h b/src/core/arm/cpu_interrupt_handler.h index 3d062d326..71e582f79 100644 --- a/src/core/arm/cpu_interrupt_handler.h +++ b/src/core/arm/cpu_interrupt_handler.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <atomic> | ||
| 7 | #include <memory> | 8 | #include <memory> |
| 8 | 9 | ||
| 9 | namespace Common { | 10 | namespace Common { |
| @@ -32,8 +33,8 @@ public: | |||
| 32 | void AwaitInterrupt(); | 33 | void AwaitInterrupt(); |
| 33 | 34 | ||
| 34 | private: | 35 | private: |
| 35 | bool is_interrupted{}; | ||
| 36 | std::unique_ptr<Common::Event> interrupt_event; | 36 | std::unique_ptr<Common::Event> interrupt_event; |
| 37 | std::atomic_bool is_interrupted{false}; | ||
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | } // namespace Core | 40 | } // namespace Core |