From: Timothy Arceri Date: Sun, 5 Mar 2017 23:41:39 +0000 (+1100) Subject: gallium/util: replace pipe_condvar with cnd_t X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e92293a601bbc141bb85f88f962264fa0b1da916;p=mesa.git gallium/util: replace pipe_condvar with cnd_t pipe_condvar was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák --- diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index ad2cda431d1..b15dd053c3d 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -121,10 +121,6 @@ __pipe_mutex_assert_locked(mtx_t *mutex) #endif } -/* pipe_condvar - */ -typedef cnd_t pipe_condvar; - /* * pipe_barrier @@ -157,7 +153,7 @@ typedef struct { unsigned waiters; uint64_t sequence; mtx_t mutex; - pipe_condvar condvar; + cnd_t condvar; } pipe_barrier; static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count) @@ -209,7 +205,7 @@ static inline void pipe_barrier_wait(pipe_barrier *barrier) typedef struct { mtx_t mutex; - pipe_condvar cond; + cnd_t cond; int counter; } pipe_semaphore; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index a89236ed7c1..96c0683a1bd 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -71,7 +71,7 @@ struct pb_slab_buffer /** Use when validating, to signal that all mappings are finished */ /* TODO: Actually validation does not reach this stage yet */ - pipe_condvar event; + cnd_t event; }; diff --git a/src/gallium/auxiliary/util/u_queue.h b/src/gallium/auxiliary/util/u_queue.h index 635545f3a65..d62d87d14d7 100644 --- a/src/gallium/auxiliary/util/u_queue.h +++ b/src/gallium/auxiliary/util/u_queue.h @@ -41,7 +41,7 @@ */ struct util_queue_fence { mtx_t mutex; - pipe_condvar cond; + cnd_t cond; int signalled; }; @@ -58,8 +58,8 @@ struct util_queue_job { struct util_queue { const char *name; mtx_t lock; - pipe_condvar has_queued_cond; - pipe_condvar has_space_cond; + cnd_t has_queued_cond; + cnd_t has_space_cond; thrd_t *threads; int num_queued; unsigned num_threads; diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c index fd51f266425..4d6166833e4 100644 --- a/src/gallium/auxiliary/util/u_ringbuffer.c +++ b/src/gallium/auxiliary/util/u_ringbuffer.c @@ -16,7 +16,7 @@ struct util_ringbuffer */ unsigned head; unsigned tail; - pipe_condvar change; + cnd_t change; mtx_t mutex; }; diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h index 4fc0801a6f0..b72026492c6 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.h +++ b/src/gallium/drivers/llvmpipe/lp_fence.h @@ -44,7 +44,7 @@ struct lp_fence unsigned id; mtx_t mutex; - pipe_condvar signalled; + cnd_t signalled; boolean issued; unsigned rank; diff --git a/src/gallium/drivers/rbug/rbug_context.h b/src/gallium/drivers/rbug/rbug_context.h index 6f11fa46b5d..e89c6eaac01 100644 --- a/src/gallium/drivers/rbug/rbug_context.h +++ b/src/gallium/drivers/rbug/rbug_context.h @@ -59,7 +59,7 @@ struct rbug_context { /* draw locking */ mtx_t draw_mutex; - pipe_condvar draw_cond; + cnd_t draw_cond; unsigned draw_num_rules; int draw_blocker; int draw_blocked; diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c index 2a65a1e13ba..7a85798f0f4 100644 --- a/src/gallium/state_trackers/nine/nine_queue.c +++ b/src/gallium/state_trackers/nine/nine_queue.c @@ -72,8 +72,8 @@ struct nine_queue_pool { unsigned tail; unsigned cur_instr; BOOL worker_wait; - pipe_condvar event_pop; - pipe_condvar event_push; + cnd_t event_pop; + cnd_t event_push; mtx_t mutex_pop; mtx_t mutex_push; }; diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index bfceeeefeac..e6d215ac742 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -63,7 +63,7 @@ struct csmt_context { thrd_t worker; struct nine_queue_pool* pool; BOOL terminate; - pipe_condvar event_processed; + cnd_t event_processed; mtx_t mutex_processed; struct NineDevice9 *device; BOOL processed;