Lines Matching defs:mutex
73 GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex)
75 assert(mutex->win32.allocated == GLFW_FALSE);
76 InitializeCriticalSection(&mutex->win32.section);
77 return mutex->win32.allocated = GLFW_TRUE;
80 void _glfwPlatformDestroyMutex(_GLFWmutex* mutex)
82 if (mutex->win32.allocated)
83 DeleteCriticalSection(&mutex->win32.section);
84 memset(mutex, 0, sizeof(_GLFWmutex));
87 void _glfwPlatformLockMutex(_GLFWmutex* mutex)
89 assert(mutex->win32.allocated == GLFW_TRUE);
90 EnterCriticalSection(&mutex->win32.section);
93 void _glfwPlatformUnlockMutex(_GLFWmutex* mutex)
95 assert(mutex->win32.allocated == GLFW_TRUE);
96 LeaveCriticalSection(&mutex->win32.section);