Added atomicLoad, atomicStore, atomicExchange, cpuRelax, getStackAddress, getHardwareThreads, timerResolutionBegin/End, memoryAllocationGranularity, and sanitizer.h. Fixed memoryPageSize returning allocation granularity on Windows. (#435)

This commit is contained in:
Branimir Karadžić
2026-09-29 19:16:07 -07:00
committed by GitHub
parent e98d9f4b35
commit 3b8366af83
12 changed files with 436 additions and 26 deletions

View File

@@ -430,11 +430,7 @@ namespace bx
{
if (BX_ENABLED( (BX_PLATFORM_LINUX || BX_PLATFORM_OSX) && BX_ARCH_64BIT) )
{
#if BX_COMPILER_GCC || BX_COMPILER_CLANG
const uintptr_t* stackFrame = (const uintptr_t*)__builtin_frame_address(0);
#else
const uintptr_t* stackFrame = NULL;
#endif // BX_COMPILER_...
const uintptr_t* stackFrame = (const uintptr_t*)BX_STACK_FRAME_ADDRESS();
uint32_t num = 0;
@@ -620,7 +616,7 @@ namespace bx
return num;
}
else if (BX_ENABLED(BX_PLATFORM_WINDOWS && BX_CPU_X86 && BX_ARCH_64BIT) )
else if (BX_ENABLED(BX_PLATFORM_WINDOWS && BX_ARCH_64BIT) )
{
return getCallStackWinRtl(_skip + 1 /* skip self */, _max, _outStack);
}