AuroraRuntime/Source/AuProcAddresses.hpp

72 lines
2.0 KiB
C++
Raw Normal View History

/***
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuProcAddresses.hpp
Date: 2023-2-16
Author: Reece
***/
#pragma once
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "AuProcAddresses.NT.hpp"
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
2023-08-12 09:16:20 +00:00
#include "AuProcAddresses.Linux.hpp"
#endif
#if defined(AURORA_IS_POSIX_DERIVED)
#include "AuProcAddresses.UNIX.hpp"
#endif
namespace Aurora
{
void InitProcAddresses();
inline bool gUseNativeWaitRWLock {};
bool SysNativeWaitOnAddressFutexSupported();
bool SysWaitOnAddressNoTimed(const void *pTargetAddress,
const void *pCompareAddress,
AuUInt8 uWordSize);
bool SysWaitOnAddressTimed(const void *pTargetAddress,
const void *pCompareAddress,
AuUInt8 uWordSize,
AuUInt64 uAbsTimeSteadyClock,
AuUInt64 uRelativeNanoseconds,
AuOptional<AuUInt64> uAbsTimeAltClock /* hint */,
bool bSpun = false);
void SysWakeNOnAddress(const void *pAddress,
AuUInt32 dwCount);
void SysWakeOneOnAddress(const void *pAddress);
void SysWakeAllOnAddress(const void *pAddress);
AuUInt64 SysGetFileLength(AuUInt uOSHandle);
2024-03-19 15:47:42 +00:00
void SysWriteEoS(AuUInt uOSHandle);
void SysFlushHandle(AuUInt uOSHandle);
void SysCloseHandle(AuUInt uOSHandle);
bool SysHandleIsNonZero(AuUInt uOSHandle);
2024-03-19 15:47:42 +00:00
void *SysAllocateLarge(AuUInt uLength);
void SysAllocateFree(void *pBuffer, AuUInt uLength);
2024-04-09 21:29:11 +00:00
bool SysMemoryLockPages(const void *pVoid, AuUInt uLength);
bool SysMemoryUnlockPages(const void *pVoid, AuUInt uLength);
2024-03-19 15:47:42 +00:00
}
#if defined(AURORA_IS_MODERNNT_DERIVED) || defined(AURORA_IS_POSIX_DERIVED)
#if !defined(AURORA_HAS_SYS_ALLOC_LARGE)
#define AURORA_HAS_SYS_ALLOC_LARGE
#endif
#endif