| 3652 | /* Pop the top node off the priority QUEUE, lock the node, return it. */ |
| 3653 | |
| 3654 | static struct merge_node * |
| 3655 | queue_pop (struct merge_node_queue *queue) |
| 3656 | { |
| 3657 | struct merge_node *node; |
| 3658 | pthread_mutex_lock (&queue->mutex); |
| 3659 | while (! (node = heap_remove_top (queue->priority_queue))) |
| 3660 | pthread_cond_wait (&queue->cond, &queue->mutex); |
| 3661 | pthread_mutex_unlock (&queue->mutex); |
| 3662 | lock_node (node); |
| 3663 | node->queued = false; |
| 3664 | return node; |
| 3665 | } |
| 3666 | |
| 3667 | /* Output LINE to TFP, unless -u is specified and the line compares |
| 3668 | equal to the previous line. TEMP_OUTPUT is the name of TFP, or |
no test coverage detected