summaryrefslogtreecommitdiffstats
path: root/src/core/arm/cpu_interrupt_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm/cpu_interrupt_handler.h')
-rw-r--r--src/core/arm/cpu_interrupt_handler.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/core/arm/cpu_interrupt_handler.h b/src/core/arm/cpu_interrupt_handler.h
new file mode 100644
index 000000000..3d062d326
--- /dev/null
+++ b/src/core/arm/cpu_interrupt_handler.h
@@ -0,0 +1,39 @@
+// Copyright 2020 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+
+namespace Common {
+class Event;
+}
+
+namespace Core {
+
+class CPUInterruptHandler {
+public:
+ CPUInterruptHandler();
+ ~CPUInterruptHandler();
+
+ CPUInterruptHandler(const CPUInterruptHandler&) = delete;
+ CPUInterruptHandler& operator=(const CPUInterruptHandler&) = delete;
+
+ CPUInterruptHandler(CPUInterruptHandler&&) = default;
+ CPUInterruptHandler& operator=(CPUInterruptHandler&&) = default;
+
+ bool IsInterrupted() const {
+ return is_interrupted;
+ }
+
+ void SetInterrupt(bool is_interrupted);
+
+ void AwaitInterrupt();
+
+private:
+ bool is_interrupted{};
+ std::unique_ptr<Common::Event> interrupt_event;
+};
+
+} // namespace Core