diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp b/src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp index b4defae569..c35cedb348 100644 --- a/src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp +++ b/src/3rdparty/angle/src/compiler/translator/InitializeParseContext.cpp @@ -6,35 +6,37 @@ #include "compiler/translator/InitializeParseContext.h" -#include "compiler/translator/osinclude.h" +#include "common/tls.h" -OS_TLSIndex GlobalParseContextIndex = OS_INVALID_TLS_INDEX; +#include <assert.h> + +TLSIndex GlobalParseContextIndex = TLS_INVALID_INDEX; bool InitializeParseContextIndex() { - assert(GlobalParseContextIndex == OS_INVALID_TLS_INDEX); + assert(GlobalParseContextIndex == TLS_INVALID_INDEX); - GlobalParseContextIndex = OS_AllocTLSIndex(); - return GlobalParseContextIndex != OS_INVALID_TLS_INDEX; + GlobalParseContextIndex = CreateTLSIndex(); + return GlobalParseContextIndex != TLS_INVALID_INDEX; } void FreeParseContextIndex() { - assert(GlobalParseContextIndex != OS_INVALID_TLS_INDEX); + assert(GlobalParseContextIndex != TLS_INVALID_INDEX); - OS_FreeTLSIndex(GlobalParseContextIndex); - GlobalParseContextIndex = OS_INVALID_TLS_INDEX; + DestroyTLSIndex(GlobalParseContextIndex); + GlobalParseContextIndex = TLS_INVALID_INDEX; } void SetGlobalParseContext(TParseContext* context) { - assert(GlobalParseContextIndex != OS_INVALID_TLS_INDEX); - OS_SetTLSValue(GlobalParseContextIndex, context); + assert(GlobalParseContextIndex != TLS_INVALID_INDEX); + SetTLSValue(GlobalParseContextIndex, context); } TParseContext* GetGlobalParseContext() { - assert(GlobalParseContextIndex != OS_INVALID_TLS_INDEX); - return static_cast<TParseContext*>(OS_GetTLSValue(GlobalParseContextIndex)); + assert(GlobalParseContextIndex != TLS_INVALID_INDEX); + return static_cast<TParseContext*>(GetTLSValue(GlobalParseContextIndex)); } |