mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-01 12:15:37 +00:00
20 lines
494 B
C++
20 lines
494 B
C++
// SPDX-FileCopyrightText: 2019-2022 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 {
|
|
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
|