while (queue->capacity != 0 && queue->capacity == xbt_dynar_length(queue->data)) {
DEBUG2("Capacity of %p exceded (=%d). Waiting",queue,queue->capacity);
xbt_cond_wait(queue->not_full,queue->mutex);
}
xbt_dynar_unshift(queue->data,src);
xbt_cond_signal(queue->not_empty);
while (queue->capacity != 0 && queue->capacity == xbt_dynar_length(queue->data)) {
DEBUG2("Capacity of %p exceded (=%d). Waiting",queue,queue->capacity);
xbt_cond_wait(queue->not_full,queue->mutex);
}
xbt_dynar_unshift(queue->data,src);
xbt_cond_signal(queue->not_empty);