pthread_mutex_init(&queue->mtx, NULL);
}
-void queue_del(Queue *queue)
+void queue_dst(Queue *queue)
{
pthread_cond_destroy(&queue->cnd);
pthread_mutex_destroy(&queue->mtx);
The queue should be uninitialized or deleted when passed to this function.
*/
-void queue_del(Queue *queue);
+void queue_dst(Queue *queue);
/*
- Delete the queue.
+ Destroy the queue.
Afterwards, the queue should no longer be used.
for (int i = 0; i < 17; i++)
pthread_join(threads[i], NULL);
- queue_del(&queue);
+ queue_dst(&queue);
printf("\n");
}