mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 18:05:47 -04:00
Common: Add memory arena and page fault handler classes
This commit is contained in:
18
src/common/page_fault_handler.h
Normal file
18
src/common/page_fault_handler.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <functional>
|
||||
|
||||
namespace Common::PageFaultHandler {
|
||||
enum class HandlerResult
|
||||
{
|
||||
ContinueExecution,
|
||||
ExecuteNextHandler,
|
||||
};
|
||||
|
||||
using Callback = std::function<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
|
Reference in New Issue
Block a user