aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/glapi_entrypoint.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-03-05 23:40:39 +0100
committermarha <marha@users.sourceforge.net>2015-03-05 23:42:09 +0100
commitc646056120fe14e4c4ccf81bac5d78d61225a8e8 (patch)
treeba0af42750f0ab6dc4724342a7063835636222b5 /mesalib/src/mapi/glapi/glapi_entrypoint.c
parent87e58a93f7248171e736656080069cb65ff56aae (diff)
parent8574eba804031f6b19713f0b02952280730bf62e (diff)
downloadvcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.gz
vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.bz2
vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast.c mesalib/src/mesa/main/.gitignore mesalib/src/mesa/main/queryobj.c
Diffstat (limited to 'mesalib/src/mapi/glapi/glapi_entrypoint.c')
-rw-r--r--mesalib/src/mapi/glapi/glapi_entrypoint.c9
1 files changed, 4 insertions, 5 deletions
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
}