41 tls->win32.index = TlsAlloc();
42 if (tls->win32.index == TLS_OUT_OF_INDEXES)
45 "Win32: Failed to allocate TLS index");
55 if (tls->win32.allocated)
56 TlsFree(tls->win32.index);
63 return TlsGetValue(tls->win32.index);
69 TlsSetValue(tls->win32.index, value);
75 InitializeCriticalSection(&mutex->win32.section);
76 return mutex->win32.allocated =
GLFW_TRUE;
81 if (mutex->win32.allocated)
82 DeleteCriticalSection(&mutex->win32.section);
89 EnterCriticalSection(&mutex->win32.section);
95 LeaveCriticalSection(&mutex->win32.section);
void _glfwPlatformLockMutex(_GLFWmutex *mutex)
void _glfwPlatformDestroyTls(_GLFWtls *tls)
void _glfwPlatformDestroyMutex(_GLFWmutex *mutex)
void _glfwPlatformSetTls(_GLFWtls *tls, void *value)
#define GLFW_PLATFORM_ERROR
A platform-specific error occurred that does not match any of the more specific categories.
void * _glfwPlatformGetTls(_GLFWtls *tls)
void _glfwInputErrorWin32(int error, const char *description)
GLFWbool _glfwPlatformCreateTls(_GLFWtls *tls)
void _glfwPlatformUnlockMutex(_GLFWmutex *mutex)
GLFWbool _glfwPlatformCreateMutex(_GLFWmutex *mutex)