summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldriver.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/egldriver.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/egldriver.c')
-rw-r--r--src/egl/main/egldriver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 6983af966b6..e6a61f3108b 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -37,13 +37,13 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include "c11/threads.h"
#include "eglstring.h"
#include "egldefines.h"
#include "egldisplay.h"
#include "egldriver.h"
#include "egllog.h"
+#include "eglmutex.h"
#if defined(_EGL_OS_UNIX)
#include <dlfcn.h>
@@ -63,7 +63,7 @@ typedef struct _egl_module {
_EGLDriver *Driver;
} _EGLModule;
-static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
+static _EGLMutex _eglModuleMutex = _EGL_MUTEX_INITIALIZER;
static _EGLArray *_eglModules;
const struct {
@@ -616,7 +616,7 @@ _eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only)
assert(!dpy->Initialized);
- mtx_lock(&_eglModuleMutex);
+ _eglLockMutex(&_eglModuleMutex);
/* set options */
dpy->Options.TestOnly = test_only;
@@ -628,7 +628,7 @@ _eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only)
best_drv = _eglMatchAndInitialize(dpy);
}
- mtx_unlock(&_eglModuleMutex);
+ _eglUnlockMutex(&_eglModuleMutex);
if (best_drv) {
_eglLog(_EGL_DEBUG, "the best driver is %s%s",