projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: include u_pointer,h, not p_pointer.h
[mesa.git]
/
src
/
gallium
/
auxiliary
/
rtasm
/
rtasm_execmem.c
diff --git
a/src/gallium/auxiliary/rtasm/rtasm_execmem.c
b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
index cb13db24983dfcd23e61ad10a77c0b0445186d03..19087589a873695fc65e130b34bd3be1d26abdd9 100644
(file)
--- a/
src/gallium/auxiliary/rtasm/rtasm_execmem.c
+++ b/
src/gallium/auxiliary/rtasm/rtasm_execmem.c
@@
-33,6
+33,7
@@
#include "pipe/p_compiler.h"
#include "pipe/p_debug.h"
#include "pipe/p_thread.h"
#include "pipe/p_compiler.h"
#include "pipe/p_debug.h"
#include "pipe/p_thread.h"
+#include "util/u_memory.h"
#include "rtasm_execmem.h"
#include "rtasm_execmem.h"
@@
-46,11
+47,12
@@
#include <unistd.h>
#include <sys/mman.h>
#include <unistd.h>
#include <sys/mman.h>
-#include "mm.h"
+#include "pipe/p_thread.h"
+#include "util/u_mm.h"
#define EXEC_HEAP_SIZE (10*1024*1024)
#define EXEC_HEAP_SIZE (10*1024*1024)
-
_glthread_DECLARE_STATIC_MUTEX
(exec_mutex);
+
pipe_static_mutex
(exec_mutex);
static struct mem_block *exec_heap = NULL;
static unsigned char *exec_mem = NULL;
static struct mem_block *exec_heap = NULL;
static unsigned char *exec_mem = NULL;
@@
-75,7
+77,7
@@
rtasm_exec_malloc(size_t size)
struct mem_block *block = NULL;
void *addr = NULL;
struct mem_block *block = NULL;
void *addr = NULL;
-
_glthread_LOCK_MUTEX
(exec_mutex);
+
pipe_mutex_lock
(exec_mutex);
init_heap();
init_heap();
@@
-89,7
+91,7
@@
rtasm_exec_malloc(size_t size)
else
debug_printf("rtasm_exec_malloc failed\n");
else
debug_printf("rtasm_exec_malloc failed\n");
-
_glthread_UNLOCK_MUTEX
(exec_mutex);
+
pipe_mutex_unlock
(exec_mutex);
return addr;
}
return addr;
}
@@
-98,7
+100,7
@@
rtasm_exec_malloc(size_t size)
void
rtasm_exec_free(void *addr)
{
void
rtasm_exec_free(void *addr)
{
-
_glthread_LOCK_MUTEX
(exec_mutex);
+
pipe_mutex_lock
(exec_mutex);
if (exec_heap) {
struct mem_block *block = mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
if (exec_heap) {
struct mem_block *block = mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
@@
-107,7
+109,7
@@
rtasm_exec_free(void *addr)
mmFreeMem(block);
}
mmFreeMem(block);
}
-
_glthread_UNLOCK_MUTEX
(exec_mutex);
+
pipe_mutex_unlock
(exec_mutex);
}
}
@@
-118,7
+120,7
@@
rtasm_exec_free(void *addr)
*/
void *
*/
void *
-rtasm_exec_malloc(
GLuin
t size)
+rtasm_exec_malloc(
size_
t size)
{
return MALLOC( size );
}
{
return MALLOC( size );
}