diff options
author | Timothy Arceri <[email protected]> | 2017-03-05 12:32:06 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-07 08:53:05 +1100 |
commit | 628e84a58fdb26c63a705861b92f65f242613321 (patch) | |
tree | bd6084a4dee53a1f180c62f41e790ab490ddf3ee /src/gallium/auxiliary/util | |
parent | ba72554f3e576c1674d52ab16d8d2edff9398b71 (diff) |
gallium/util: replace pipe_mutex_unlock() with mtx_unlock()
pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12.
Replaced using:
find ./src -type f -exec sed -i -- \
's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \;
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_flush.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_memory.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_refcnt.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_symbol.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_queue.c | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_range.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_ringbuffer.c | 4 |
7 files changed, 25 insertions, 25 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index dde21f9f917..06d0cfafa82 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -167,7 +167,7 @@ debug_flush_ctx_create(boolean catch_reference_of_mapped, unsigned bt_depth) fctx->bt_depth = bt_depth; mtx_lock(&list_mutex); list_addtail(&fctx->head, &ctx_list); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); return fctx; @@ -227,7 +227,7 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) } fbuf->map_frame = debug_flush_capture_frame(1, fbuf->bt_depth); fbuf->mapped = TRUE; - pipe_mutex_unlock(fbuf->mutex); + mtx_unlock(&fbuf->mutex); if (mapped_sync) { struct debug_flush_ctx *fctx; @@ -244,7 +244,7 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) FALSE, FALSE, item->ref_frame); } } - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); } } @@ -263,7 +263,7 @@ debug_flush_unmap(struct debug_flush_buf *fbuf) fbuf->mapped = FALSE; FREE(fbuf->map_frame); fbuf->map_frame = NULL; - pipe_mutex_unlock(fbuf->mutex); + mtx_unlock(&fbuf->mutex); } void @@ -284,7 +284,7 @@ debug_flush_cb_reference(struct debug_flush_ctx *fctx, debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, FALSE, FALSE, fbuf->map_frame); } - pipe_mutex_unlock(fbuf->mutex); + mtx_unlock(&fbuf->mutex); if (!item) { item = CALLOC_STRUCT(debug_flush_item); @@ -328,7 +328,7 @@ debug_flush_might_flush_cb(void *key, void *value, void *data) debug_flush_alert(NULL, "First reference", 0, item->bt_depth, FALSE, FALSE, item->ref_frame); } - pipe_mutex_unlock(fbuf->mutex); + mtx_unlock(&fbuf->mutex); return PIPE_OK; } diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c index d5b0d916cbe..1ba553cb6e7 100644 --- a/src/gallium/auxiliary/util/u_debug_memory.c +++ b/src/gallium/auxiliary/util/u_debug_memory.c @@ -155,7 +155,7 @@ debug_malloc(const char *file, unsigned line, const char *function, mtx_lock(&list_mutex); LIST_ADDTAIL(&hdr->head, &list); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); return data_from_header(hdr); } @@ -200,7 +200,7 @@ debug_free(const char *file, unsigned line, const char *function, #else mtx_lock(&list_mutex); LIST_DEL(&hdr->head); - pipe_mutex_unlock(list_mutex); + mtx_unlock(&list_mutex); hdr->magic = 0; ftr->magic = 0; @@ -275,7 +275,7 @@ debug_realloc(const char *file, unsigned line, const char *function, 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); diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c index 1db1787001c..cb0158253e1 100644 --- a/src/gallium/auxiliary/util/u_debug_refcnt.c +++ b/src/gallium/auxiliary/util/u_debug_refcnt.c @@ -112,7 +112,7 @@ debug_serial(void *p, unsigned *pserial) util_hash_table_set(serials_hash, p, (void *) (uintptr_t) serial); found = FALSE; } - pipe_mutex_unlock(serials_mutex); + mtx_unlock(&serials_mutex); *pserial = serial; @@ -128,7 +128,7 @@ debug_serial_delete(void *p) { mtx_lock(&serials_mutex); util_hash_table_remove(serials_hash, p); - pipe_mutex_unlock(serials_mutex); + mtx_unlock(&serials_mutex); } diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c index de320b3e585..f0b0629c8e8 100644 --- a/src/gallium/auxiliary/util/u_debug_symbol.c +++ b/src/gallium/auxiliary/util/u_debug_symbol.c @@ -313,6 +313,6 @@ debug_symbol_name_cached(const void *addr) util_hash_table_set(symbols_hash, (void*)addr, (void*)name); } - pipe_mutex_unlock(symbols_mutex); + mtx_unlock(&symbols_mutex); return name; } diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c index 2926d8c6bfc..25252300897 100644 --- a/src/gallium/auxiliary/util/u_queue.c +++ b/src/gallium/auxiliary/util/u_queue.c @@ -52,7 +52,7 @@ atexit_handler(void) LIST_FOR_EACH_ENTRY(iter, &queue_list, head) { util_queue_killall_and_wait(iter); } - pipe_mutex_unlock(exit_mutex); + mtx_unlock(&exit_mutex); } static void @@ -69,7 +69,7 @@ add_to_atexit_list(struct util_queue *queue) mtx_lock(&exit_mutex); LIST_ADD(&queue->head, &queue_list); - pipe_mutex_unlock(exit_mutex); + mtx_unlock(&exit_mutex); } static void @@ -84,7 +84,7 @@ remove_from_atexit_list(struct util_queue *queue) break; } } - pipe_mutex_unlock(exit_mutex); + mtx_unlock(&exit_mutex); } /**************************************************************************** @@ -97,7 +97,7 @@ util_queue_fence_signal(struct util_queue_fence *fence) mtx_lock(&fence->mutex); fence->signalled = true; cnd_broadcast(&fence->cond); - pipe_mutex_unlock(fence->mutex); + mtx_unlock(&fence->mutex); } void @@ -106,7 +106,7 @@ util_queue_fence_wait(struct util_queue_fence *fence) mtx_lock(&fence->mutex); while (!fence->signalled) cnd_wait(&fence->cond, &fence->mutex); - pipe_mutex_unlock(fence->mutex); + mtx_unlock(&fence->mutex); } void @@ -159,7 +159,7 @@ static PIPE_THREAD_ROUTINE(util_queue_thread_func, input) cnd_wait(&queue->has_queued_cond, &queue->lock); if (queue->kill_threads) { - pipe_mutex_unlock(queue->lock); + mtx_unlock(&queue->lock); break; } @@ -169,7 +169,7 @@ static PIPE_THREAD_ROUTINE(util_queue_thread_func, input) queue->num_queued--; cnd_signal(&queue->has_space_cond); - pipe_mutex_unlock(queue->lock); + mtx_unlock(&queue->lock); if (job.job) { job.execute(job.job, thread_index); @@ -188,7 +188,7 @@ static PIPE_THREAD_ROUTINE(util_queue_thread_func, input) queue->read_idx = (queue->read_idx + 1) % queue->max_jobs; } queue->num_queued = 0; /* reset this when exiting the thread */ - pipe_mutex_unlock(queue->lock); + mtx_unlock(&queue->lock); return 0; } @@ -268,7 +268,7 @@ util_queue_killall_and_wait(struct util_queue *queue) mtx_lock(&queue->lock); queue->kill_threads = 1; cnd_broadcast(&queue->has_queued_cond); - pipe_mutex_unlock(queue->lock); + mtx_unlock(&queue->lock); for (i = 0; i < queue->num_threads; i++) pipe_thread_wait(queue->threads[i]); @@ -317,7 +317,7 @@ util_queue_add_job(struct util_queue *queue, queue->num_queued++; cnd_signal(&queue->has_queued_cond); - pipe_mutex_unlock(queue->lock); + mtx_unlock(&queue->lock); } int64_t diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h index a09dc9ae267..7d3fc61aa32 100644 --- a/src/gallium/auxiliary/util/u_range.h +++ b/src/gallium/auxiliary/util/u_range.h @@ -62,7 +62,7 @@ util_range_add(struct util_range *range, unsigned start, unsigned end) mtx_lock(&range->write_mutex); range->start = MIN2(start, range->start); range->end = MAX2(end, range->end); - pipe_mutex_unlock(range->write_mutex); + mtx_unlock(&range->write_mutex); } } diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c index 6a83d305c8a..fd51f266425 100644 --- a/src/gallium/auxiliary/util/u_ringbuffer.c +++ b/src/gallium/auxiliary/util/u_ringbuffer.c @@ -103,7 +103,7 @@ void util_ringbuffer_enqueue( struct util_ringbuffer *ring, /* Signal change: */ cnd_signal(&ring->change); - pipe_mutex_unlock(ring->mutex); + mtx_unlock(&ring->mutex); } enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring, @@ -155,6 +155,6 @@ out: /* Signal change: */ cnd_signal(&ring->change); - pipe_mutex_unlock(ring->mutex); + mtx_unlock(&ring->mutex); return ret; } |