aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/execmem.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-04 12:18:13 +0100
committermarha <marha@users.sourceforge.net>2014-03-04 12:23:48 +0100
commit45392e4a0642880b569ea5d4a350cdc395a2c7db (patch)
treec3c2a49de903a18c3f8e1bf79684c29337ebcf7c /mesalib/src/mesa/main/execmem.c
parent5ec0616d4e3c4c6095f4975abbe9c21e5b6af967 (diff)
parent321c01267ae1c446f1bd22b642567fcafa016c02 (diff)
downloadvcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.gz
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.bz2
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 libxcb mesa xserver xcb-proto xkeyboard-config git update 4 Mar 2014 Conflicts: mesalib/src/mapi/glapi/glapi.h mesalib/src/mapi/glapi/glthread.c mesalib/src/mesa/drivers/dri/common/dri_util.c mesalib/src/mesa/main/bufferobj.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/winmultiwindowwm.c
Diffstat (limited to 'mesalib/src/mesa/main/execmem.c')
-rw-r--r--mesalib/src/mesa/main/execmem.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/execmem.c b/mesalib/src/mesa/main/execmem.c
index d63bb4a4e..7267cf85f 100644
--- a/mesalib/src/mesa/main/execmem.c
+++ b/mesalib/src/mesa/main/execmem.c
@@ -32,7 +32,6 @@
#include "imports.h"
-#include "glapi/glthread.h"
@@ -59,7 +58,7 @@
#define EXEC_HEAP_SIZE (10*1024*1024)
-_glthread_DECLARE_STATIC_MUTEX(exec_mutex);
+static mtx_t exec_mutex = _MTX_INITIALIZER_NP;
static struct mem_block *exec_heap = NULL;
static unsigned char *exec_mem = NULL;
@@ -93,7 +92,7 @@ _mesa_exec_malloc(GLuint size)
struct mem_block *block = NULL;
void *addr = NULL;
- _glthread_LOCK_MUTEX(exec_mutex);
+ mtx_lock(&exec_mutex);
if (!init_heap())
goto bail;
@@ -109,7 +108,7 @@ _mesa_exec_malloc(GLuint size)
printf("_mesa_exec_malloc failed\n");
bail:
- _glthread_UNLOCK_MUTEX(exec_mutex);
+ mtx_unlock(&exec_mutex);
return addr;
}
@@ -118,7 +117,7 @@ bail:
void
_mesa_exec_free(void *addr)
{
- _glthread_LOCK_MUTEX(exec_mutex);
+ mtx_lock(&exec_mutex);
if (exec_heap) {
struct mem_block *block = mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
@@ -127,7 +126,7 @@ _mesa_exec_free(void *addr)
mmFreeMem(block);
}
- _glthread_UNLOCK_MUTEX(exec_mutex);
+ mtx_unlock(&exec_mutex);
}