On 15/11/2019 21:44, Julian Brown wrote:
@@ -2732,13 +2732,9 @@ wait_for_queue_nonfull (struct goacc_asyncqueue *aq) { if (aq->queue_n == ASYNC_QUEUE_SIZE) { - pthread_mutex_lock (&aq->mutex); - /* Queue is full. Wait for it to not be full. */ while (aq->queue_n == ASYNC_QUEUE_SIZE) pthread_cond_wait (&aq->queue_cond_out, &aq->mutex); - - pthread_mutex_unlock (&aq->mutex); } }
If wait_for_queue_nonfull requires the mutex locked on entry then the comment above the function should say so.
Otherwise this looks fine. Andrew