2023-02-16 16:01:21 +00:00
|
|
|
/***
|
|
|
|
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"
|
2024-03-05 11:06:29 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AURORA_IS_LINUX_DERIVED)
|
2023-08-12 09:16:20 +00:00
|
|
|
#include "AuProcAddresses.Linux.hpp"
|
2023-02-16 16:01:21 +00:00
|
|
|
#endif
|
|
|
|
|
2024-03-05 11:06:29 +00:00
|
|
|
#if defined(AURORA_IS_POSIX_DERIVED)
|
|
|
|
#include "AuProcAddresses.UNIX.hpp"
|
|
|
|
#endif
|
|
|
|
|
2023-02-16 16:01:21 +00:00
|
|
|
namespace Aurora
|
|
|
|
{
|
|
|
|
void InitProcAddresses();
|
2023-06-15 23:05:46 +00:00
|
|
|
|
|
|
|
inline bool gUseNativeWaitRWLock {};
|
2024-03-03 00:25:10 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2024-03-12 22:50:22 +00:00
|
|
|
void SysWakeOneOnAddress(const void *pAddress);
|
|
|
|
|
2024-03-03 00:25:10 +00:00
|
|
|
void SysWakeAllOnAddress(const void *pAddress);
|
2024-03-07 06:49:23 +00:00
|
|
|
|
|
|
|
AuUInt64 SysGetFileLength(AuUInt uOSHandle);
|
2024-03-19 15:47:42 +00:00
|
|
|
|
2024-03-27 03:12:49 +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
|