projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: add ARB_instanced_arrays EXT_dsa function
[mesa.git]
/
src
/
mapi
/
u_execmem.c
diff --git
a/src/mapi/u_execmem.c
b/src/mapi/u_execmem.c
index b6751edb5dd51c33e6d3c101a0f8781804e5cbc6..89d5c1d08d5338b7262aa3a80bffb4d243839d59 100644
(file)
--- a/
src/mapi/u_execmem.c
+++ b/
src/mapi/u_execmem.c
@@
-1,6
+1,5
@@
/*
* Mesa 3-D graphics library
/*
* Mesa 3-D graphics library
- * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@
-33,14
+32,14
@@
*/
*/
-#include "
u_compiler
.h"
-#include "
u_thread
.h"
+#include "
c99_compat
.h"
+#include "
c11/threads
.h"
#include "u_execmem.h"
#define EXEC_MAP_SIZE (4*1024)
#include "u_execmem.h"
#define EXEC_MAP_SIZE (4*1024)
-
u_mutex_declare_static(exec_mutex)
;
+
static mtx_t exec_mutex = _MTX_INITIALIZER_NP
;
static unsigned int head = 0;
static unsigned int head = 0;
@@
-124,7
+123,7
@@
u_execmem_alloc(unsigned int size)
{
void *addr = NULL;
{
void *addr = NULL;
-
u_mutex_lock(
exec_mutex);
+
mtx_lock(&
exec_mutex);
if (!init_map())
goto bail;
if (!init_map())
goto bail;
@@
-138,7
+137,7
@@
u_execmem_alloc(unsigned int size)
head += size;
bail:
head += size;
bail:
-
u_mutex_unlock(
exec_mutex);
+
mtx_unlock(&
exec_mutex);
return addr;
}
return addr;
}