diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c b/lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c index f1cc8eb1b..1ba553cb6 100644 --- a/lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c +++ b/lib/mesa/src/gallium/auxiliary/util/u_debug_memory.c @@ -87,7 +87,7 @@ struct debug_memory_footer static struct list_head list = { &list, &list }; -pipe_static_mutex(list_mutex); +static mtx_t list_mutex = _MTX_INITIALIZER_NP; static unsigned long last_no = 0; @@ -153,9 +153,9 @@ debug_malloc(const char *file, unsigned line, const char *function, ftr = footer_from_header(hdr); ftr->magic = DEBUG_MEMORY_MAGIC; - pipe_mutex_lock(list_mutex); + mtx_lock(&list_mutex); LIST_ADDTAIL(&hdr->head, &list); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); return data_from_header(hdr); } @@ -198,9 +198,9 @@ debug_free(const char *file, unsigned line, const char *function, /* set freed memory to special value */ memset(ptr, DEBUG_FREED_BYTE, hdr->size); #else - pipe_mutex_lock(list_mutex); + mtx_lock(&list_mutex); LIST_DEL(&hdr->head); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); hdr->magic = 0; ftr->magic = 0; @@ -273,9 +273,9 @@ debug_realloc(const char *file, unsigned line, const char *function, new_ftr = footer_from_header(new_hdr); new_ftr->magic = DEBUG_MEMORY_MAGIC; - pipe_mutex_lock(list_mutex); + mtx_lock(&list_mutex); LIST_REPLACE(&old_hdr->head, &new_hdr->head); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); /* copy data */ new_ptr = data_from_header(new_hdr); |