summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldriver.c
diff options
context:
space:
mode:
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",