diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-28 15:21:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 15:21:47 +0200 |
commit | 40320a1d8428f9079d43a363421083678c4a9042 (patch) | |
tree | c2ba44c006d34873b288b0bf8624be19a55d025a | |
parent | Merge pull request #4530 from Morph1984/mjolnir-p1 (diff) | |
parent | cpu_interrupt_handler: Misc style changes (diff) | |
download | yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar.gz yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar.bz2 yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar.lz yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar.xz yuzu-40320a1d8428f9079d43a363421083678c4a9042.tar.zst yuzu-40320a1d8428f9079d43a363421083678c4a9042.zip |
-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 @@ namespace Core { -CPUInterruptHandler::CPUInterruptHandler() : is_interrupted{} { - interrupt_event = std::make_unique<Common::Event>(); -} +CPUInterruptHandler::CPUInterruptHandler() : interrupt_event{std::make_unique<Common::Event>()} {} CPUInterruptHandler::~CPUInterruptHandler() = default; @@ -17,7 +15,7 @@ void CPUInterruptHandler::SetInterrupt(bool is_interrupted_) { if (is_interrupted_) { interrupt_event->Set(); } - this->is_interrupted = is_interrupted_; + is_interrupted = is_interrupted_; } 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 @@ #pragma once +#include <atomic> #include <memory> namespace Common { @@ -32,8 +33,8 @@ public: void AwaitInterrupt(); private: - bool is_interrupted{}; std::unique_ptr<Common::Event> interrupt_event; + std::atomic_bool is_interrupted{false}; }; } // namespace Core |