summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-03-06 16:54:55 +0000
committerEmil Velikov <[email protected]>2015-03-11 23:28:25 +0000
commitefe87f1a801c61d087cd2b29a2c150453241c3d4 (patch)
treed7decbfd791f6ee4ab728d10f8573984a4bad4ee /src/egl/main/eglapi.c
parent90e50908d7f080d91f41d889cfe0dc67134971eb (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/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 22588300644..a74efcd8f99 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -87,6 +87,8 @@
#include <stdlib.h>
#include <string.h>
#include "c99_compat.h"
+#include "c11/threads.h"
+#include "eglcompiler.h"
#include "eglglobals.h"
#include "eglcontext.h"
@@ -275,7 +277,7 @@ _eglLockDisplay(EGLDisplay display)
{
_EGLDisplay *dpy = _eglLookupDisplay(display);
if (dpy)
- _eglLockMutex(&dpy->Mutex);
+ mtx_lock(&dpy->Mutex);
return dpy;
}
@@ -286,7 +288,7 @@ _eglLockDisplay(EGLDisplay display)
static inline void
_eglUnlockDisplay(_EGLDisplay *dpy)
{
- _eglUnlockMutex(&dpy->Mutex);
+ mtx_unlock(&dpy->Mutex);
}
@@ -896,7 +898,7 @@ eglWaitClient(void)
RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
disp = ctx->Resource.Display;
- _eglLockMutex(&disp->Mutex);
+ mtx_lock(&disp->Mutex);
/* let bad current context imply bad current surface */
if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT ||
@@ -942,7 +944,7 @@ eglWaitNative(EGLint engine)
RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
disp = ctx->Resource.Display;
- _eglLockMutex(&disp->Mutex);
+ mtx_lock(&disp->Mutex);
/* let bad current context imply bad current surface */
if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT ||
@@ -1457,10 +1459,10 @@ eglReleaseThread(void)
t->CurrentAPIIndex = i;
- _eglLockMutex(&disp->Mutex);
+ mtx_lock(&disp->Mutex);
drv = disp->Driver;
(void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL);
- _eglUnlockMutex(&disp->Mutex);
+ mtx_unlock(&disp->Mutex);
}
}