mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 17:22:46 +01:00
99ceb03a1c
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
39 lines
841 B
C++
39 lines
841 B
C++
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <memory>
|
|
|
|
namespace Common {
|
|
class Event;
|
|
}
|
|
|
|
namespace Core {
|
|
|
|
class CPUInterruptHandler {
|
|
public:
|
|
CPUInterruptHandler();
|
|
~CPUInterruptHandler();
|
|
|
|
CPUInterruptHandler(const CPUInterruptHandler&) = delete;
|
|
CPUInterruptHandler& operator=(const CPUInterruptHandler&) = delete;
|
|
|
|
CPUInterruptHandler(CPUInterruptHandler&&) = delete;
|
|
CPUInterruptHandler& operator=(CPUInterruptHandler&&) = delete;
|
|
|
|
bool IsInterrupted() const {
|
|
return is_interrupted;
|
|
}
|
|
|
|
void SetInterrupt(bool is_interrupted);
|
|
|
|
void AwaitInterrupt();
|
|
|
|
private:
|
|
std::unique_ptr<Common::Event> interrupt_event;
|
|
std::atomic_bool is_interrupted{false};
|
|
};
|
|
|
|
} // namespace Core
|