From 8574eba804031f6b19713f0b02952280730bf62e Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 5 Mar 2015 22:17:40 +0100 Subject: fontconfig mesa git update 5 Mar 2015 --- mesalib/src/mapi/glapi/glapi_entrypoint.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mapi/glapi/glapi_entrypoint.c') diff --git a/mesalib/src/mapi/glapi/glapi_entrypoint.c b/mesalib/src/mapi/glapi/glapi_entrypoint.c index 362a8f11b..7facd8aca 100644 --- a/mesalib/src/mapi/glapi/glapi_entrypoint.c +++ b/mesalib/src/mapi/glapi/glapi_entrypoint.c @@ -29,6 +29,7 @@ */ +#include "c11/threads.h" #include "glapi/glapi_priv.h" #include "u_execmem.h" @@ -120,11 +121,9 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset) #if defined(GLX_USE_TLS) *((unsigned int *)(code + 8)) = 4 * offset; -#elif defined(THREADS) +#else *((unsigned int *)(code + 11)) = 4 * offset; *((unsigned int *)(code + 22)) = 4 * offset; -#else - *((unsigned int *)(code + 7)) = 4 * offset; #endif } @@ -338,7 +337,7 @@ void init_glapi_relocs_once( void ) { #if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS) - static pthread_once_t once_control = PTHREAD_ONCE_INIT; - pthread_once( & once_control, init_glapi_relocs ); + static once_flag flag = ONCE_FLAG_INIT; + call_once(&flag, init_glapi_relocs); #endif } -- cgit v1.2.3