This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
2020-02-25 02:04:12 +00:00
|
|
|
// Copyright 2020 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "common/thread.h"
|
|
|
|
#include "core/arm/cpu_interrupt_handler.h"
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
2020-08-26 01:16:40 +00:00
|
|
|
CPUInterruptHandler::CPUInterruptHandler() {
|
2020-02-25 02:04:12 +00:00
|
|
|
interrupt_event = std::make_unique<Common::Event>();
|
|
|
|
}
|
|
|
|
|
|
|
|
CPUInterruptHandler::~CPUInterruptHandler() = default;
|
|
|
|
|
|
|
|
void CPUInterruptHandler::SetInterrupt(bool is_interrupted_) {
|
|
|
|
if (is_interrupted_) {
|
|
|
|
interrupt_event->Set();
|
|
|
|
}
|
|
|
|
this->is_interrupted = is_interrupted_;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CPUInterruptHandler::AwaitInterrupt() {
|
|
|
|
interrupt_event->Wait();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Core
|