ctfmerge: Fix missing pthread_cond_init()

This does not appear to matter on FreeBSD or Linux, but when building an
amd64 kernel on macOS I was seeing infinite loops in ctfmerge.
It turns out the loop in wip_save_work() was looping forever due to
pthread_cond_wait() always returning -EINVAL.

Reviewed By:	markj, brooks
Differential Revision: https://reviews.freebsd.org/D25973
This commit is contained in:
Alex Richardson 2020-08-06 20:44:40 +00:00
parent dd7660e5bd
commit 5ac01ce026

View File

@ -665,6 +665,7 @@ wq_init(workqueue_t *wq, int nfiles)
for (i = 0; i < nslots; i++) {
pthread_mutex_init(&wq->wq_wip[i].wip_lock, NULL);
pthread_cond_init(&wq->wq_wip[i].wip_cv, NULL);
wq->wq_wip[i].wip_batchid = wq->wq_next_batchid++;
}