summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:00:15 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:52:07 +1100
commit75b47dda0c8895afe77858cbb67efa38e17e1838 (patch)
tree988551a306b28367a7e3f1fb3b664aeb0fe2807c /src/gallium/auxiliary
parentacdcaf9be4695ccdc4a589a3416591dd316e876c (diff)
gallium/util: replace pipe_mutex_init() with mtx_init()
pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h7
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c4
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_cache.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_slab.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_flush.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c2
-rw-r--r--src/gallium/auxiliary/util/u_queue.c4
-rw-r--r--src/gallium/auxiliary/util/u_range.h2
-rw-r--r--src/gallium/auxiliary/util/u_ringbuffer.c2
14 files changed, 17 insertions, 20 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index a6a9fea1f7e..cccb5315579 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -108,9 +108,6 @@ static inline int pipe_thread_is_self( pipe_thread thread )
return 0;
}
-#define pipe_mutex_init(mutex) \
- (void) mtx_init(&(mutex), mtx_plain)
-
#define pipe_mutex_destroy(mutex) \
mtx_destroy(&(mutex))
@@ -181,7 +178,7 @@ static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
barrier->count = count;
barrier->waiters = 0;
barrier->sequence = 0;
- pipe_mutex_init(barrier->mutex);
+ (void) mtx_init(&barrier->mutex, mtx_plain);
cnd_init(&barrier->condvar);
}
@@ -233,7 +230,7 @@ typedef struct
static inline void
pipe_semaphore_init(pipe_semaphore *sema, int init_val)
{
- pipe_mutex_init(sema->mutex);
+ (void) mtx_init(&sema->mutex, mtx_plain);
cnd_init(&sema->cond);
sema->counter = init_val;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index f5e761b1e6b..fefdcefaf53 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -1033,7 +1033,7 @@ fenced_bufmgr_create(struct pb_manager *provider,
LIST_INITHEAD(&fenced_mgr->unfenced);
fenced_mgr->num_unfenced = 0;
- pipe_mutex_init(fenced_mgr->mutex);
+ (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
return &fenced_mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 26ce60314b9..f614abfc2e8 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -417,7 +417,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
pb_debug_buffer_fill(buf);
- pipe_mutex_init(buf->mutex);
+ (void) mtx_init(&buf->mutex, mtx_plain);
pipe_mutex_lock(mgr->mutex);
LIST_ADDTAIL(&buf->head, &mgr->list);
@@ -475,7 +475,7 @@ pb_debug_manager_create(struct pb_manager *provider,
mgr->underflow_size = underflow_size;
mgr->overflow_size = overflow_size;
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
LIST_INITHEAD(&mgr->list);
return &mgr->base;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index ef7e5adac32..52cd115b5e9 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -266,7 +266,7 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
mm->size = size;
mm->align2 = align2; /* 64-byte alignment */
- pipe_mutex_init(mm->mutex);
+ (void) mtx_init(&mm->mutex, mtx_plain);
mm->buffer = buffer;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
index 3bfe720b185..fe221fc14eb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
@@ -279,7 +279,7 @@ pool_bufmgr_create(struct pb_manager *provider,
pool->bufSize = bufSize;
pool->bufAlign = desc->alignment;
- pipe_mutex_init(pool->mutex);
+ (void) mtx_init(&pool->mutex, mtx_plain);
pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc);
if (!pool->buffer)
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
index 54aba980179..43313d893b1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
@@ -473,7 +473,7 @@ pb_slab_manager_create(struct pb_manager *provider,
LIST_INITHEAD(&mgr->slabs);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
return &mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.c b/src/gallium/auxiliary/pipebuffer/pb_cache.c
index a1ca678833e..422318c599b 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_cache.c
@@ -280,7 +280,7 @@ pb_cache_init(struct pb_cache *mgr, uint usecs, float size_factor,
for (i = 0; i < ARRAY_SIZE(mgr->buckets); i++)
LIST_INITHEAD(&mgr->buckets[i]);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
mgr->cache_size = 0;
mgr->max_cache_size = maximum_cache_size;
mgr->usecs = usecs;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c
index 79529dfe5e9..6f6664f4297 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c
@@ -224,7 +224,7 @@ pb_slabs_init(struct pb_slabs *slabs,
LIST_INITHEAD(&group->slabs);
}
- pipe_mutex_init(slabs->mutex);
+ (void) mtx_init(&slabs->mutex, mtx_plain);
return true;
}
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index d12520501ed..bcce4f4ec1e 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -116,7 +116,7 @@ debug_flush_buf_create(boolean supports_unsync, unsigned bt_depth)
fbuf->supports_unsync = supports_unsync;
fbuf->bt_depth = bt_depth;
pipe_reference_init(&fbuf->reference, 1);
- pipe_mutex_init(fbuf->mutex);
+ (void) mtx_init(&fbuf->mutex, mtx_plain);
return fbuf;
out_no_buf:
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index eda95bbfff7..754ee8b1fe1 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -89,7 +89,7 @@ debug_serial(void *p, unsigned *pserial)
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(serials_mutex);
+ (void) mtx_init(&serials_mutex, mtx_plain);
first = FALSE;
}
#endif
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index cfd354a6fe6..9a4eafa2ec0 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -296,7 +296,7 @@ debug_symbol_name_cached(const void *addr)
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(symbols_mutex);
+ (void) mtx_init(&symbols_mutex, mtx_plain);
first = FALSE;
}
#endif
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index ca637ad922b..56a9fa8cf32 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -113,7 +113,7 @@ void
util_queue_fence_init(struct util_queue_fence *fence)
{
memset(fence, 0, sizeof(*fence));
- pipe_mutex_init(fence->mutex);
+ (void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->cond);
fence->signalled = true;
}
@@ -210,7 +210,7 @@ util_queue_init(struct util_queue *queue,
if (!queue->jobs)
goto fail;
- pipe_mutex_init(queue->lock);
+ (void) mtx_init(&queue->lock, mtx_plain);
queue->num_queued = 0;
cnd_init(&queue->has_queued_cond);
diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h
index 9055d7b6007..24c78ba662e 100644
--- a/src/gallium/auxiliary/util/u_range.h
+++ b/src/gallium/auxiliary/util/u_range.h
@@ -78,7 +78,7 @@ util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
static inline void
util_range_init(struct util_range *range)
{
- pipe_mutex_init(range->write_mutex);
+ (void) mtx_init(&range->write_mutex, mtx_plain);
util_range_set_empty(range);
}
diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c
index 19f82f52bf6..fce113314ae 100644
--- a/src/gallium/auxiliary/util/u_ringbuffer.c
+++ b/src/gallium/auxiliary/util/u_ringbuffer.c
@@ -36,7 +36,7 @@ struct util_ringbuffer *util_ringbuffer_create( unsigned dwords )
ring->mask = dwords - 1;
cnd_init(&ring->change);
- pipe_mutex_init(ring->mutex);
+ (void) mtx_init(&ring->mutex, mtx_plain);
return ring;
fail: