Remove OSDependent TLS functions

These are no longer used now that the PoolAllocator uses the standard
c++11 thread_local storage mechanism.
This commit is contained in:
Arcady Goldmints-Orlov 2023-07-19 12:18:21 -06:00 committed by arcady-lunarg
parent a0010e27ba
commit 4420f9b33b
3 changed files with 0 additions and 137 deletions

View file

@ -53,62 +53,6 @@
namespace glslang {
inline OS_TLSIndex ToGenericTLSIndex (DWORD handle)
{
return (OS_TLSIndex)((uintptr_t)handle + 1);
}
inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex)
{
return (DWORD)((uintptr_t)nIndex - 1);
}
//
// Thread Local Storage Operations
//
OS_TLSIndex OS_AllocTLSIndex()
{
DWORD dwIndex = TlsAlloc();
if (dwIndex == TLS_OUT_OF_INDEXES) {
assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
return OS_INVALID_TLS_INDEX;
}
return ToGenericTLSIndex(dwIndex);
}
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
{
if (nIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
return false;
}
if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue))
return true;
else
return false;
}
void* OS_GetTLSValue(OS_TLSIndex nIndex)
{
assert(nIndex != OS_INVALID_TLS_INDEX);
return TlsGetValue(ToNativeTLSIndex(nIndex));
}
bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
{
if (nIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
return false;
}
if (TlsFree(ToNativeTLSIndex(nIndex)))
return true;
else
return false;
}
HANDLE GlobalLock;
void InitGlobalLock()