diff options
author | Emil Velikov <[email protected]> | 2015-03-05 15:07:51 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-03-06 16:46:17 +0000 |
commit | 6cee785c69a5c8d2d32b6807f9c502117f5a74b0 (patch) | |
tree | 1359974cc2d2e3dd0da4ec7898f1f153bc3557d6 /src/egl/main/egldriver.c | |
parent | bfb4db83b618d57fcc5f0c9e9fdb3a7ff33d07f3 (diff) |
egl/main: use c11/threads' mutex directly
Remove the inline wrappers/abstraction layer.
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main/egldriver.c')
-rw-r--r-- | src/egl/main/egldriver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index e6a61f3108b..6983af966b6 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 _EGLMutex _eglModuleMutex = _EGL_MUTEX_INITIALIZER; +static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP; static _EGLArray *_eglModules; const struct { @@ -616,7 +616,7 @@ _eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only) assert(!dpy->Initialized); - _eglLockMutex(&_eglModuleMutex); + mtx_lock(&_eglModuleMutex); /* set options */ dpy->Options.TestOnly = test_only; @@ -628,7 +628,7 @@ _eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only) best_drv = _eglMatchAndInitialize(dpy); } - _eglUnlockMutex(&_eglModuleMutex); + mtx_unlock(&_eglModuleMutex); if (best_drv) { _eglLog(_EGL_DEBUG, "the best driver is %s%s", |