diff options
author | Emil Velikov <[email protected]> | 2015-03-06 17:07:40 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-03-06 17:07:40 +0000 |
commit | 56ede80940751bfcdaf26e9c23e439d37ef0e96b (patch) | |
tree | acb862412e11b809c5349c3fa66f541b0d17554e /src/egl/main/eglapi.c | |
parent | eb14d28e6db25eeecc89faf51837c92cc3dafbed (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/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index a74efcd8f99..22588300644 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -87,8 +87,6 @@ #include <stdlib.h> #include <string.h> #include "c99_compat.h" -#include "c11/threads.h" -#include "eglcompiler.h" #include "eglglobals.h" #include "eglcontext.h" @@ -277,7 +275,7 @@ _eglLockDisplay(EGLDisplay display) { _EGLDisplay *dpy = _eglLookupDisplay(display); if (dpy) - mtx_lock(&dpy->Mutex); + _eglLockMutex(&dpy->Mutex); return dpy; } @@ -288,7 +286,7 @@ _eglLockDisplay(EGLDisplay display) static inline void _eglUnlockDisplay(_EGLDisplay *dpy) { - mtx_unlock(&dpy->Mutex); + _eglUnlockMutex(&dpy->Mutex); } @@ -898,7 +896,7 @@ eglWaitClient(void) RETURN_EGL_SUCCESS(NULL, EGL_TRUE); disp = ctx->Resource.Display; - mtx_lock(&disp->Mutex); + _eglLockMutex(&disp->Mutex); /* let bad current context imply bad current surface */ if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT || @@ -944,7 +942,7 @@ eglWaitNative(EGLint engine) RETURN_EGL_SUCCESS(NULL, EGL_TRUE); disp = ctx->Resource.Display; - mtx_lock(&disp->Mutex); + _eglLockMutex(&disp->Mutex); /* let bad current context imply bad current surface */ if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT || @@ -1459,10 +1457,10 @@ eglReleaseThread(void) t->CurrentAPIIndex = i; - mtx_lock(&disp->Mutex); + _eglLockMutex(&disp->Mutex); drv = disp->Driver; (void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL); - mtx_unlock(&disp->Mutex); + _eglUnlockMutex(&disp->Mutex); } } |