Duckstation/src/common/page_fault_handler.h
2020-10-18 14:54:38 +10:00

18 lines
385 B
C++

#pragma once
#include "types.h"
namespace Common::PageFaultHandler {
enum class HandlerResult
{
ContinueExecution,
ExecuteNextHandler,
};
using Callback = HandlerResult(*)(void* exception_pc, void* fault_address, bool is_write);
using Handle = void*;
bool InstallHandler(void* owner, Callback callback);
bool RemoveHandler(void* owner);
} // namespace Common::PageFaultHandler