gallium/util: replace pipe_condvar_broadcast() with cnd_broadcast()
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 4 Mar 2017 23:41:33 +0000 (10:41 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Mar 2017 21:23:26 +0000 (08:23 +1100)
pipe_condvar_broadcast() was made unnecessary with fd33a6bcd7f12.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/os/os_thread.h
src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
src/gallium/auxiliary/util/u_queue.c
src/gallium/drivers/llvmpipe/lp_fence.c
src/gallium/drivers/rbug/rbug_core.c

index a8b5d926342cda314f2158e9b3644c1b821f3aa0..6eca2ca2c7ab4cc965619cf34409851b7c7eb601 100644 (file)
@@ -148,9 +148,6 @@ __pipe_mutex_assert_locked(pipe_mutex *mutex)
  */
 typedef cnd_t pipe_condvar;
 
-#define pipe_condvar_broadcast(cond) \
-   cnd_broadcast(&(cond))
-
 
 /*
  * pipe_barrier
@@ -218,7 +215,7 @@ static inline void pipe_barrier_wait(pipe_barrier *barrier)
    } else {
       barrier->waiters = 0;
       barrier->sequence++;
-      pipe_condvar_broadcast(barrier->condvar);
+      cnd_broadcast(&barrier->condvar);
    }
 
    pipe_mutex_unlock(barrier->mutex);
index 541a6d9079a9420ceb92268135a033acb4d5e11c..cc42eeae564d8a24b5b11d754f4c54a3eb2b5cf1 100644 (file)
@@ -246,7 +246,7 @@ pb_slab_buffer_unmap(struct pb_buffer *_buf)
 
    --buf->mapCount;
    if (buf->mapCount == 0) 
-       pipe_condvar_broadcast(buf->event);
+       cnd_broadcast(&buf->event);
 }
 
 
index 3cef7d200bac58a759677d1bbc6fb443425f2229..c84e0ad684097e9b091f911842213322295d81e4 100644 (file)
@@ -96,7 +96,7 @@ util_queue_fence_signal(struct util_queue_fence *fence)
 {
    pipe_mutex_lock(fence->mutex);
    fence->signalled = true;
-   pipe_condvar_broadcast(fence->cond);
+   cnd_broadcast(&fence->cond);
    pipe_mutex_unlock(fence->mutex);
 }
 
@@ -267,7 +267,7 @@ util_queue_killall_and_wait(struct util_queue *queue)
    /* Signal all threads to terminate. */
    pipe_mutex_lock(queue->lock);
    queue->kill_threads = 1;
-   pipe_condvar_broadcast(queue->has_queued_cond);
+   cnd_broadcast(&queue->has_queued_cond);
    pipe_mutex_unlock(queue->lock);
 
    for (i = 0; i < queue->num_threads; i++)
index 1a8e365f004573473b3bb22a5f7d479d90e245a8..115589f8705d839cb8ecd2a1d99f6179379b6f31 100644 (file)
@@ -99,7 +99,7 @@ lp_fence_signal(struct lp_fence *fence)
 
    /* Wakeup all threads waiting on the mutex:
     */
-   pipe_condvar_broadcast(fence->signalled);
+   cnd_broadcast(&fence->signalled);
 
    pipe_mutex_unlock(fence->mutex);
 }
index dedbc14e8d8c5a0d7ba6ec3c57f7c7db160116f5..3bb781b57bfa62aca718298951562059ab91db32 100644 (file)
@@ -409,7 +409,7 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
    }
    pipe_mutex_unlock(rb_context->draw_mutex);
 
-   pipe_condvar_broadcast(rb_context->draw_cond);
+   cnd_broadcast(&rb_context->draw_cond);
 
    pipe_mutex_unlock(rb_screen->list_mutex);
 
@@ -442,7 +442,7 @@ rbug_context_draw_unblock(struct rbug_rbug *tr_rbug, struct rbug_header *header,
    rb_context->draw_blocker &= ~unblock->unblock;
    pipe_mutex_unlock(rb_context->draw_mutex);
 
-   pipe_condvar_broadcast(rb_context->draw_cond);
+   cnd_broadcast(&rb_context->draw_cond);
 
    pipe_mutex_unlock(rb_screen->list_mutex);
 
@@ -474,7 +474,7 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
    rb_context->draw_blocker |= RBUG_BLOCK_RULE;
    pipe_mutex_unlock(rb_context->draw_mutex);
 
-   pipe_condvar_broadcast(rb_context->draw_cond);
+   cnd_broadcast(&rb_context->draw_cond);
 
    pipe_mutex_unlock(rb_screen->list_mutex);