diff options
author | Emil Velikov <[email protected]> | 2015-03-06 16:54:55 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-03-11 23:28:25 +0000 |
commit | efe87f1a801c61d087cd2b29a2c150453241c3d4 (patch) | |
tree | d7decbfd791f6ee4ab728d10f8573984a4bad4ee /src/egl/main/egldriver.c | |
parent | 90e50908d7f080d91f41d889cfe0dc67134971eb (diff) |
egl/main: use c11/threads' mutex directly
Remove the inline wrappers/abstraction layer.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Brian Paul <[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", |