Remove DWORD from shared TLS keys

This commit is contained in:
notmatthewbeshay
2026-03-14 06:28:46 +11:00
parent f4d8815285
commit 2180aaa4bc
12 changed files with 74 additions and 56 deletions

View File

@@ -26,12 +26,12 @@
namespace
{
#if defined(_WIN32)
inline void *EntityTlsGetValue(DWORD key)
inline void *EntityTlsGetValue(Entity::TlsKey key)
{
return TlsGetValue(key);
}
inline void EntityTlsSetValue(DWORD key, void *value)
inline void EntityTlsSetValue(Entity::TlsKey key, void *value)
{
TlsSetValue(key, value);
}
@@ -59,9 +59,9 @@ namespace
int Entity::entityCounter = 2048; // 4J - changed initialiser to 2048, as we are using range 0 - 2047 as special unique smaller ids for things that need network tracked
#if defined(_WIN32)
DWORD Entity::tlsIdx = TlsAlloc();
Entity::TlsKey Entity::tlsIdx = TlsAlloc();
#else
pthread_key_t Entity::tlsIdx = CreateEntityTlsKey();
Entity::TlsKey Entity::tlsIdx = CreateEntityTlsKey();
#endif
// 4J - added getSmallId & freeSmallId methods