lab7/code/queue.c
/* Remember to initilize the queue before using it */
Remember to initilize the queue before using it
Remember to initilize the queue before using it
void initialize_queue(pqueue_t * q) {
	assert(q != NULL);
	q->head = q->tail = NULL;
	pthread_mutex_init(&q->lock, NULL);
}
void initialize_queue ( pqueue_t * q ) { assert ( q != NULL ) ; q -> head = q -> tail = NULL ; pthread_mutex_init ( & q -> lock , NULL ) ; }
Remember to initilize the queue before using it
Remember to initilize the queue before using it