mirror of
https://github.com/bkaradzic/bx.git
synced 2026-10-22 16:51:01 +00:00
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:
committed by
GitHub
parent
e98d9f4b35
commit
3b8366af83
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user