*/
typedef cnd_t pipe_condvar;
-#define pipe_condvar_destroy(cond) \
- cnd_destroy(&(cond))
-
#define pipe_condvar_wait(cond, mutex) \
cnd_wait(&(cond), &(mutex))
{
assert(barrier->waiters == 0);
pipe_mutex_destroy(barrier->mutex);
- pipe_condvar_destroy(barrier->condvar);
+ cnd_destroy(&barrier->condvar);
}
static inline void pipe_barrier_wait(pipe_barrier *barrier)
pipe_semaphore_destroy(pipe_semaphore *sema)
{
pipe_mutex_destroy(sema->mutex);
- pipe_condvar_destroy(sema->cond);
+ cnd_destroy(&sema->cond);
}
/** Signal/increment semaphore counter */
util_queue_fence_destroy(struct util_queue_fence *fence)
{
assert(fence->signalled);
- pipe_condvar_destroy(fence->cond);
+ cnd_destroy(&fence->cond);
pipe_mutex_destroy(fence->mutex);
}
FREE(queue->threads);
if (queue->jobs) {
- pipe_condvar_destroy(queue->has_space_cond);
- pipe_condvar_destroy(queue->has_queued_cond);
+ cnd_destroy(&queue->has_space_cond);
+ cnd_destroy(&queue->has_queued_cond);
pipe_mutex_destroy(queue->lock);
FREE(queue->jobs);
}
util_queue_killall_and_wait(queue);
remove_from_atexit_list(queue);
- pipe_condvar_destroy(queue->has_space_cond);
- pipe_condvar_destroy(queue->has_queued_cond);
+ cnd_destroy(&queue->has_space_cond);
+ cnd_destroy(&queue->has_queued_cond);
pipe_mutex_destroy(queue->lock);
FREE(queue->jobs);
FREE(queue->threads);
void util_ringbuffer_destroy( struct util_ringbuffer *ring )
{
- pipe_condvar_destroy(ring->change);
+ cnd_destroy(&ring->change);
pipe_mutex_destroy(ring->mutex);
FREE(ring->buf);
FREE(ring);
debug_printf("%s %d\n", __FUNCTION__, fence->id);
pipe_mutex_destroy(fence->mutex);
- pipe_condvar_destroy(fence->signalled);
+ cnd_destroy(&fence->signalled);
FREE(fence);
}