From 9fec342554f3c8d7dc9d418071d9b0951352c81b Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Wed, 25 Mar 2026 16:32:06 -0500 Subject: [PATCH] remove TlsAlloc, TlsFree, TlsGetValue, TlsSetValue --- .../Platform/Linux/Stubs/winapi_stubs.h | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h index 452562fad..78fe936b2 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/winapi_stubs.h @@ -306,28 +306,6 @@ static inline ULONG TryEnterCriticalSection( return pthread_mutex_trylock(CriticalSection) == 0; } -// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsalloc -static inline DWORD TlsAlloc(VOID) { - pthread_key_t key; - if (pthread_key_create(&key, NULL) == 0) return key; - return TLS_OUT_OF_INDEXES; -} - -// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsfree -static inline BOOL TlsFree(DWORD dwTlsIndex) { - return pthread_key_delete(dwTlsIndex) == 0; -} - -// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsgetvalue -static inline LPVOID TlsGetValue(DWORD dwTlsIndex) { - return pthread_getspecific(dwTlsIndex); -} - -// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlssetvalue -static inline BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) { - return pthread_setspecific(dwTlsIndex, lpTlsValue) == 0; -} - // https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalmemorystatus static inline VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer) { // TODO: Parse /proc/meminfo and set lpBuffer based on that. Probably will