summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/rtasm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
commit051645c92924bf915d82bf219f2ed67309b5577a (patch)
tree4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/auxiliary/rtasm
parent2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff)
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/rtasm')
-rw-r--r--lib/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/lib/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c
index edbb45970..ca84b594b 100644
--- a/lib/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c
+++ b/lib/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c
@@ -63,7 +63,7 @@
#define EXEC_HEAP_SIZE (10*1024*1024)
-pipe_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;
@@ -102,7 +102,7 @@ rtasm_exec_malloc(size_t size)
struct mem_block *block = NULL;
void *addr = NULL;
- pipe_mutex_lock(exec_mutex);
+ mtx_lock(&exec_mutex);
if (!init_heap())
goto bail;
@@ -118,7 +118,7 @@ rtasm_exec_malloc(size_t size)
debug_printf("rtasm_exec_malloc failed\n");
bail:
- pipe_mutex_unlock(exec_mutex);
+ mtx_unlock(&exec_mutex);
return addr;
}
@@ -127,7 +127,7 @@ bail:
void
rtasm_exec_free(void *addr)
{
- pipe_mutex_lock(exec_mutex);
+ mtx_lock(&exec_mutex);
if (exec_heap) {
struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
@@ -136,7 +136,7 @@ rtasm_exec_free(void *addr)
u_mmFreeMem(block);
}
- pipe_mutex_unlock(exec_mutex);
+ mtx_unlock(&exec_mutex);
}