summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-03-06 17:07:40 +0000
committerEmil Velikov <[email protected]>2015-03-06 17:07:40 +0000
commit56ede80940751bfcdaf26e9c23e439d37ef0e96b (patch)
treeacb862412e11b809c5349c3fa66f541b0d17554e /src/egl/main/egldisplay.c
parenteb14d28e6db25eeecc89faf51837c92cc3dafbed (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/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index b7a5b8fb9d9..a167ae5c738 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -35,14 +35,13 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include "c11/threads.h"
-
#include "eglcontext.h"
#include "eglcurrent.h"
#include "eglsurface.h"
#include "egldisplay.h"
#include "egldriver.h"
#include "eglglobals.h"
+#include "eglmutex.h"
#include "egllog.h"
/* Includes for _eglNativePlatformDetectNativeDisplay */
@@ -261,7 +260,7 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
if (plat == _EGL_INVALID_PLATFORM)
return NULL;
- mtx_lock(_eglGlobal.Mutex);
+ _eglLockMutex(_eglGlobal.Mutex);
/* search the display list first */
dpy = _eglGlobal.DisplayList;
@@ -275,7 +274,7 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
if (!dpy) {
dpy = calloc(1, sizeof(_EGLDisplay));
if (dpy) {
- mtx_init(&dpy->Mutex, mtx_plain);
+ _eglInitMutex(&dpy->Mutex);
dpy->Platform = plat;
dpy->PlatformDisplay = plat_dpy;
@@ -285,7 +284,7 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
}
}
- mtx_unlock(_eglGlobal.Mutex);
+ _eglUnlockMutex(_eglGlobal.Mutex);
return dpy;
}
@@ -345,14 +344,14 @@ _eglCheckDisplayHandle(EGLDisplay dpy)
{
_EGLDisplay *cur;
- mtx_lock(_eglGlobal.Mutex);
+ _eglLockMutex(_eglGlobal.Mutex);
cur = _eglGlobal.DisplayList;
while (cur) {
if (cur == (_EGLDisplay *) dpy)
break;
cur = cur->Next;
}
- mtx_unlock(_eglGlobal.Mutex);
+ _eglUnlockMutex(_eglGlobal.Mutex);
return (cur != NULL);
}