*/
typedef cnd_t pipe_condvar;
-#define pipe_condvar_signal(cond) \
- cnd_signal(&(cond))
-
#define pipe_condvar_broadcast(cond) \
cnd_broadcast(&(cond))
{
pipe_mutex_lock(sema->mutex);
sema->counter++;
- pipe_condvar_signal(sema->cond);
+ cnd_signal(&sema->cond);
pipe_mutex_unlock(sema->mutex);
}
queue->read_idx = (queue->read_idx + 1) % queue->max_jobs;
queue->num_queued--;
- pipe_condvar_signal(queue->has_space_cond);
+ cnd_signal(&queue->has_space_cond);
pipe_mutex_unlock(queue->lock);
if (job.job) {
queue->write_idx = (queue->write_idx + 1) % queue->max_jobs;
queue->num_queued++;
- pipe_condvar_signal(queue->has_queued_cond);
+ cnd_signal(&queue->has_queued_cond);
pipe_mutex_unlock(queue->lock);
}
/* Signal change:
*/
- pipe_condvar_signal(ring->change);
+ cnd_signal(&ring->change);
pipe_mutex_unlock(ring->mutex);
}
out:
/* Signal change:
*/
- pipe_condvar_signal(ring->change);
+ cnd_signal(&ring->change);
pipe_mutex_unlock(ring->mutex);
return ret;
}
pipe_mutex_lock(ctx->mutex_pop);
DBG("freeing cmdbuf=%p\n", cmdbuf);
cmdbuf->full = 0;
- pipe_condvar_signal(ctx->event_pop);
+ cnd_signal(&ctx->event_pop);
pipe_mutex_unlock(ctx->mutex_pop);
ctx->tail = (ctx->tail + 1) & NINE_CMD_BUFS_MASK;
/* signal waiting worker */
pipe_mutex_lock(ctx->mutex_push);
cmdbuf->full = 1;
- pipe_condvar_signal(ctx->event_push);
+ cnd_signal(&ctx->event_push);
pipe_mutex_unlock(ctx->mutex_push);
ctx->head = (ctx->head + 1) & NINE_CMD_BUFS_MASK;
if (instr->func(ctx->device, instr)) {
pipe_mutex_lock(ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
- pipe_condvar_signal(ctx->event_processed);
+ cnd_signal(&ctx->event_processed);
pipe_mutex_unlock(ctx->mutex_processed);
}
if (p_atomic_read(&ctx->toPause)) {
if (p_atomic_read(&ctx->terminate)) {
pipe_mutex_lock(ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
- pipe_condvar_signal(ctx->event_processed);
+ cnd_signal(&ctx->event_processed);
pipe_mutex_unlock(ctx->mutex_processed);
break;
}