Misc: Purge unused code and report startup error to host

This commit is contained in:
Stenzek
2024-05-05 21:32:04 +10:00
parent ca3cfbaa99
commit fa104acdd1
17 changed files with 146 additions and 179 deletions

View File

@ -1,19 +1,18 @@
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#pragma once
#include "common/types.h"
namespace Common::PageFaultHandler {
class Error;
namespace PageFaultHandler {
enum class HandlerResult
{
ContinueExecution,
ExecuteNextHandler,
};
using Handler = HandlerResult (*)(void* exception_pc, void* fault_address, bool is_write);
bool InstallHandler(Handler callback);
bool RemoveHandler(Handler callback);
} // namespace Common::PageFaultHandler
HandlerResult HandlePageFault(void* exception_pc, void* fault_address, bool is_write);
bool Install(Error* error = nullptr);
} // namespace PageFaultHandler