From 5ac01ce026aa871e24065f931b5b5c36024c96f9 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 6 Aug 2020 20:44:40 +0000 Subject: 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 --- cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cddl/contrib') diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c index a3d05ad20b28..ddb5f388ca98 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c @@ -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++; } -- cgit v1.2.3