AuroraRuntime/Source/AuProcAddresses.hpp

60 lines
1.7 KiB
C++

/***
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)
#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);
void *SysAllocateLarge(AuUInt uLength);
void SysAllocateFree(void *pBuffer, AuUInt uLength);
}
#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