Add suffixes to platform specific helper functions

Also merge win32_tls.h into win32_platform.h.
This commit is contained in:
Camilla Berglund
2015-12-03 18:16:46 +01:00
parent 0a3b5952e0
commit 12b6c56903
42 changed files with 375 additions and 358 deletions
+7 -7
View File
@@ -32,7 +32,7 @@
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
GLFWbool _glfwCreateContextTLS(void)
GLFWbool _glfwInitThreadLocalStoragePOSIX(void)
{
if (pthread_key_create(&_glfw.posix_tls.context, NULL) != 0)
{
@@ -45,22 +45,22 @@ GLFWbool _glfwCreateContextTLS(void)
return GLFW_TRUE;
}
void _glfwDestroyContextTLS(void)
void _glfwTerminateThreadLocalStoragePOSIX(void)
{
if (_glfw.posix_tls.allocated)
pthread_key_delete(_glfw.posix_tls.context);
}
void _glfwSetContextTLS(_GLFWwindow* context)
{
pthread_setspecific(_glfw.posix_tls.context, context);
}
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
void _glfwPlatformSetCurrentContext(_GLFWwindow* context)
{
pthread_setspecific(_glfw.posix_tls.context, context);
}
_GLFWwindow* _glfwPlatformGetCurrentContext(void)
{
return pthread_getspecific(_glfw.posix_tls.context);