43 tls->win32.index = TlsAlloc();
44 if (tls->win32.index == TLS_OUT_OF_INDEXES)
47 "Win32: Failed to allocate TLS index");
57 if (tls->win32.allocated)
58 TlsFree(tls->win32.index);
64 assert(tls->win32.allocated ==
GLFW_TRUE);
65 return TlsGetValue(tls->win32.index);
70 assert(tls->win32.allocated ==
GLFW_TRUE);
71 TlsSetValue(tls->win32.index, value);
77 InitializeCriticalSection(&mutex->win32.section);
78 return mutex->win32.allocated =
GLFW_TRUE;
83 if (mutex->win32.allocated)
84 DeleteCriticalSection(&mutex->win32.section);
90 assert(mutex->win32.allocated ==
GLFW_TRUE);
91 EnterCriticalSection(&mutex->win32.section);
96 assert(mutex->win32.allocated ==
GLFW_TRUE);
97 LeaveCriticalSection(&mutex->win32.section);
#define GLFW_PLATFORM_ERROR
A platform-specific error occurred that does not match any of the more specific categories.
void _glfwInputErrorWin32(int error, const char *description)
void _glfwPlatformLockMutex(_GLFWmutex *mutex)
void _glfwPlatformSetTls(_GLFWtls *tls, void *value)
void _glfwPlatformDestroyTls(_GLFWtls *tls)
void _glfwPlatformDestroyMutex(_GLFWmutex *mutex)
GLFWbool _glfwPlatformCreateMutex(_GLFWmutex *mutex)
void * _glfwPlatformGetTls(_GLFWtls *tls)
void _glfwPlatformUnlockMutex(_GLFWmutex *mutex)
GLFWbool _glfwPlatformCreateTls(_GLFWtls *tls)