summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglscreen.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/eglscreen.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/eglscreen.c')
-rw-r--r--src/egl/main/eglscreen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/egl/main/eglscreen.c b/src/egl/main/eglscreen.c
index 42ac621fcd9..b8f2b39c7b9 100644
--- a/src/egl/main/eglscreen.c
+++ b/src/egl/main/eglscreen.c
@@ -44,20 +44,20 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include "c11/threads.h"
#include "egldisplay.h"
#include "eglcurrent.h"
#include "eglmode.h"
#include "eglsurface.h"
#include "eglscreen.h"
+#include "eglmutex.h"
#ifdef EGL_MESA_screen_surface
/* ugh, no atomic op? */
-static mtx_t _eglNextScreenHandleMutex = _MTX_INITIALIZER_NP;
+static _EGLMutex _eglNextScreenHandleMutex = _EGL_MUTEX_INITIALIZER;
static EGLScreenMESA _eglNextScreenHandle = 1;
@@ -70,10 +70,10 @@ _eglAllocScreenHandle(void)
{
EGLScreenMESA s;
- mtx_lock(&_eglNextScreenHandleMutex);
+ _eglLockMutex(&_eglNextScreenHandleMutex);
s = _eglNextScreenHandle;
_eglNextScreenHandle += _EGL_SCREEN_MAX_MODES;
- mtx_unlock(&_eglNextScreenHandleMutex);
+ _eglUnlockMutex(&_eglNextScreenHandleMutex);
return s;
}