diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp b/src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp index abe70262f2..887cb66504 100644 --- a/src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp +++ b/src/3rdparty/angle/src/compiler/translator/PoolAlloc.cpp @@ -6,43 +6,44 @@ #include "compiler/translator/PoolAlloc.h" -#ifndef _MSC_VER -#include <stdint.h> -#endif -#include <stdio.h> +#include "compiler/translator/InitializeGlobals.h" +#include "common/platform.h" #include "common/angleutils.h" -#include "compiler/translator/InitializeGlobals.h" -#include "compiler/translator/osinclude.h" +#include "common/tls.h" + +#include <stdint.h> +#include <stdio.h> +#include <assert.h> -OS_TLSIndex PoolIndex = OS_INVALID_TLS_INDEX; +TLSIndex PoolIndex = TLS_INVALID_INDEX; bool InitializePoolIndex() { - assert(PoolIndex == OS_INVALID_TLS_INDEX); + assert(PoolIndex == TLS_INVALID_INDEX); - PoolIndex = OS_AllocTLSIndex(); - return PoolIndex != OS_INVALID_TLS_INDEX; + PoolIndex = CreateTLSIndex(); + return PoolIndex != TLS_INVALID_INDEX; } void FreePoolIndex() { - assert(PoolIndex != OS_INVALID_TLS_INDEX); + assert(PoolIndex != TLS_INVALID_INDEX); - OS_FreeTLSIndex(PoolIndex); - PoolIndex = OS_INVALID_TLS_INDEX; + DestroyTLSIndex(PoolIndex); + PoolIndex = TLS_INVALID_INDEX; } TPoolAllocator* GetGlobalPoolAllocator() { - assert(PoolIndex != OS_INVALID_TLS_INDEX); - return static_cast<TPoolAllocator*>(OS_GetTLSValue(PoolIndex)); + assert(PoolIndex != TLS_INVALID_INDEX); + return static_cast<TPoolAllocator*>(GetTLSValue(PoolIndex)); } void SetGlobalPoolAllocator(TPoolAllocator* poolAllocator) { - assert(PoolIndex != OS_INVALID_TLS_INDEX); - OS_SetTLSValue(PoolIndex, poolAllocator); + assert(PoolIndex != TLS_INVALID_INDEX); + SetTLSValue(PoolIndex, poolAllocator); } // |