diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/os/os_thread.h | 14 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_cache.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_slab.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_flush.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_queue.h | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_range.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_ringbuffer.c | 2 |
12 files changed, 18 insertions, 22 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 6eca2ca2c7a..af350b878ab 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -108,12 +108,8 @@ static inline int pipe_thread_is_self( pipe_thread thread ) return 0; } -/* pipe_mutex - */ -typedef mtx_t pipe_mutex; - #define pipe_static_mutex(mutex) \ - static pipe_mutex mutex = _MTX_INITIALIZER_NP + static mtx_t mutex = _MTX_INITIALIZER_NP #define pipe_mutex_init(mutex) \ (void) mtx_init(&(mutex), mtx_plain) @@ -131,11 +127,11 @@ typedef mtx_t pipe_mutex; __pipe_mutex_assert_locked(&(mutex)) static inline void -__pipe_mutex_assert_locked(pipe_mutex *mutex) +__pipe_mutex_assert_locked(mtx_t *mutex) { #ifdef DEBUG /* NOTE: this would not work for recursive mutexes, but - * pipe_mutex doesn't support those + * mtx_t doesn't support those */ int ret = mtx_trylock(mutex); assert(ret == thrd_busy); @@ -179,7 +175,7 @@ typedef struct { unsigned count; unsigned waiters; uint64_t sequence; - pipe_mutex mutex; + mtx_t mutex; pipe_condvar condvar; } pipe_barrier; @@ -231,7 +227,7 @@ static inline void pipe_barrier_wait(pipe_barrier *barrier) typedef struct { - pipe_mutex mutex; + mtx_t mutex; pipe_condvar cond; int counter; } pipe_semaphore; diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 7717d784f78..f5e761b1e6b 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -81,7 +81,7 @@ struct fenced_manager /** * Following members are mutable and protected by this mutex. */ - pipe_mutex mutex; + mtx_t mutex; /** * Fenced buffer list. diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index 4e36866e08c..26ce60314b9 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -78,7 +78,7 @@ struct pb_debug_buffer struct debug_stack_frame create_backtrace[PB_DEBUG_CREATE_BACKTRACE]; - pipe_mutex mutex; + mtx_t mutex; unsigned map_count; struct debug_stack_frame map_backtrace[PB_DEBUG_MAP_BACKTRACE]; @@ -95,7 +95,7 @@ struct pb_debug_manager pb_size underflow_size; pb_size overflow_size; - pipe_mutex mutex; + mtx_t mutex; struct list_head list; }; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c index 023a028a1d0..ef7e5adac32 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c @@ -53,7 +53,7 @@ struct mm_pb_manager { struct pb_manager base; - pipe_mutex mutex; + mtx_t mutex; pb_size size; struct mem_block *heap; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c index 98877b46352..3bfe720b185 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c @@ -56,7 +56,7 @@ struct pool_pb_manager { struct pb_manager base; - pipe_mutex mutex; + mtx_t mutex; pb_size bufSize; pb_size bufAlign; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index cc42eeae564..54aba980179 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -128,7 +128,7 @@ struct pb_slab_manager */ struct list_head slabs; - pipe_mutex mutex; + mtx_t mutex; }; diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.h b/src/gallium/auxiliary/pipebuffer/pb_cache.h index 7000fcd1c5a..d082eca8b5d 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_cache.h +++ b/src/gallium/auxiliary/pipebuffer/pb_cache.h @@ -52,7 +52,7 @@ struct pb_cache */ struct list_head buckets[4]; - pipe_mutex mutex; + mtx_t mutex; uint64_t cache_size; uint64_t max_cache_size; unsigned usecs; diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.h b/src/gallium/auxiliary/pipebuffer/pb_slab.h index e779d95e08a..78a4bf7c47c 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_slab.h +++ b/src/gallium/auxiliary/pipebuffer/pb_slab.h @@ -110,7 +110,7 @@ typedef bool (slab_can_reclaim_fn)(void *priv, struct pb_slab_entry *); */ struct pb_slabs { - pipe_mutex mutex; + mtx_t mutex; unsigned min_order; unsigned num_orders; diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 52e72cd6d88..6a8a91d3130 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -53,7 +53,7 @@ struct debug_flush_buf { /* Atomic */ struct pipe_reference reference; /* Must be the first member. */ - pipe_mutex mutex; + mtx_t mutex; /* Immutable */ boolean supports_unsync; unsigned bt_depth; diff --git a/src/gallium/auxiliary/util/u_queue.h b/src/gallium/auxiliary/util/u_queue.h index 2e0a5a36e26..8d4804f5c6a 100644 --- a/src/gallium/auxiliary/util/u_queue.h +++ b/src/gallium/auxiliary/util/u_queue.h @@ -40,7 +40,7 @@ * Put this into your job structure. */ struct util_queue_fence { - pipe_mutex mutex; + mtx_t mutex; pipe_condvar cond; int signalled; }; @@ -57,7 +57,7 @@ struct util_queue_job { /* Put this into your context. */ struct util_queue { const char *name; - pipe_mutex lock; + mtx_t lock; pipe_condvar has_queued_cond; pipe_condvar has_space_cond; pipe_thread *threads; diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h index a1da5e5a6f0..9055d7b6007 100644 --- a/src/gallium/auxiliary/util/u_range.h +++ b/src/gallium/auxiliary/util/u_range.h @@ -43,7 +43,7 @@ struct util_range { unsigned end; /* exclusive */ /* for the range to be consistent with multiple contexts: */ - pipe_mutex write_mutex; + mtx_t write_mutex; }; diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c index a97236fe54c..19f82f52bf6 100644 --- a/src/gallium/auxiliary/util/u_ringbuffer.c +++ b/src/gallium/auxiliary/util/u_ringbuffer.c @@ -17,7 +17,7 @@ struct util_ringbuffer unsigned head; unsigned tail; pipe_condvar change; - pipe_mutex mutex; + mtx_t mutex; }; |