gallium/util: replace pipe_condvar with cnd_t

pipe_condvar was made unnecessary with fd33a6bcd7.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2017-03-06 10:41:39 +11:00
parent e5375ba028
commit e92293a601
8 changed files with 12 additions and 16 deletions

View File

@ -121,10 +121,6 @@ __pipe_mutex_assert_locked(mtx_t *mutex)
#endif #endif
} }
/* pipe_condvar
*/
typedef cnd_t pipe_condvar;
/* /*
* pipe_barrier * pipe_barrier
@ -157,7 +153,7 @@ typedef struct {
unsigned waiters; unsigned waiters;
uint64_t sequence; uint64_t sequence;
mtx_t mutex; mtx_t mutex;
pipe_condvar condvar; cnd_t condvar;
} pipe_barrier; } pipe_barrier;
static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count) 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 typedef struct
{ {
mtx_t mutex; mtx_t mutex;
pipe_condvar cond; cnd_t cond;
int counter; int counter;
} pipe_semaphore; } pipe_semaphore;

View File

@ -71,7 +71,7 @@ struct pb_slab_buffer
/** Use when validating, to signal that all mappings are finished */ /** Use when validating, to signal that all mappings are finished */
/* TODO: Actually validation does not reach this stage yet */ /* TODO: Actually validation does not reach this stage yet */
pipe_condvar event; cnd_t event;
}; };

View File

@ -41,7 +41,7 @@
*/ */
struct util_queue_fence { struct util_queue_fence {
mtx_t mutex; mtx_t mutex;
pipe_condvar cond; cnd_t cond;
int signalled; int signalled;
}; };
@ -58,8 +58,8 @@ struct util_queue_job {
struct util_queue { struct util_queue {
const char *name; const char *name;
mtx_t lock; mtx_t lock;
pipe_condvar has_queued_cond; cnd_t has_queued_cond;
pipe_condvar has_space_cond; cnd_t has_space_cond;
thrd_t *threads; thrd_t *threads;
int num_queued; int num_queued;
unsigned num_threads; unsigned num_threads;

View File

@ -16,7 +16,7 @@ struct util_ringbuffer
*/ */
unsigned head; unsigned head;
unsigned tail; unsigned tail;
pipe_condvar change; cnd_t change;
mtx_t mutex; mtx_t mutex;
}; };

View File

@ -44,7 +44,7 @@ struct lp_fence
unsigned id; unsigned id;
mtx_t mutex; mtx_t mutex;
pipe_condvar signalled; cnd_t signalled;
boolean issued; boolean issued;
unsigned rank; unsigned rank;

View File

@ -59,7 +59,7 @@ struct rbug_context {
/* draw locking */ /* draw locking */
mtx_t draw_mutex; mtx_t draw_mutex;
pipe_condvar draw_cond; cnd_t draw_cond;
unsigned draw_num_rules; unsigned draw_num_rules;
int draw_blocker; int draw_blocker;
int draw_blocked; int draw_blocked;

View File

@ -72,8 +72,8 @@ struct nine_queue_pool {
unsigned tail; unsigned tail;
unsigned cur_instr; unsigned cur_instr;
BOOL worker_wait; BOOL worker_wait;
pipe_condvar event_pop; cnd_t event_pop;
pipe_condvar event_push; cnd_t event_push;
mtx_t mutex_pop; mtx_t mutex_pop;
mtx_t mutex_push; mtx_t mutex_push;
}; };

View File

@ -63,7 +63,7 @@ struct csmt_context {
thrd_t worker; thrd_t worker;
struct nine_queue_pool* pool; struct nine_queue_pool* pool;
BOOL terminate; BOOL terminate;
pipe_condvar event_processed; cnd_t event_processed;
mtx_t mutex_processed; mtx_t mutex_processed;
struct NineDevice9 *device; struct NineDevice9 *device;
BOOL processed; BOOL processed;