summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglglobals.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-03-06 17:07:40 +0000
committerEmil Velikov <[email protected]>2015-03-06 17:07:40 +0000
commit56ede80940751bfcdaf26e9c23e439d37ef0e96b (patch)
treeacb862412e11b809c5349c3fa66f541b0d17554e /src/egl/main/eglglobals.c
parenteb14d28e6db25eeecc89faf51837c92cc3dafbed (diff)
Revert "egl/main: use c11/threads' mutex directly"
This reverts commit 6cee785c69a5c8d2d32b6807f9c502117f5a74b0. Not meant to go in yet. Lacking review.
Diffstat (limited to 'src/egl/main/eglglobals.c')
-rw-r--r--src/egl/main/eglglobals.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c
index 129bf29f1e9..56fe9e29d8b 100644
--- a/src/egl/main/eglglobals.c
+++ b/src/egl/main/eglglobals.c
@@ -30,14 +30,13 @@
#include <stdlib.h>
#include <assert.h>
-#include "c11/threads.h"
-
#include "eglglobals.h"
#include "egldisplay.h"
#include "egldriver.h"
+#include "eglmutex.h"
-static mtx_t _eglGlobalMutex = _MTX_INITIALIZER_NP;
+static _EGLMutex _eglGlobalMutex = _EGL_MUTEX_INITIALIZER;
struct _egl_global _eglGlobal =
{
@@ -85,7 +84,7 @@ _eglAddAtExitCall(void (*func)(void))
if (func) {
static EGLBoolean registered = EGL_FALSE;
- mtx_lock(_eglGlobal.Mutex);
+ _eglLockMutex(_eglGlobal.Mutex);
if (!registered) {
atexit(_eglAtExit);
@@ -95,6 +94,6 @@ _eglAddAtExitCall(void (*func)(void))
assert(_eglGlobal.NumAtExitCalls < ARRAY_SIZE(_eglGlobal.AtExitCalls));
_eglGlobal.AtExitCalls[_eglGlobal.NumAtExitCalls++] = func;
- mtx_unlock(_eglGlobal.Mutex);
+ _eglUnlockMutex(_eglGlobal.Mutex);
}
}