Date: Wed, 20 Feb 2019 13:19:08 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344359 - head/cddl/contrib/opensolaris/lib/libzpool/common Message-ID: <201902201319.x1KDJ82E011375@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Wed Feb 20 13:19:08 2019 New Revision: 344359 URL: https://svnweb.freebsd.org/changeset/base/344359 Log: fix userland illumos taskq code to pass relative timeout to cv_timedwait Unlike illumos, FreeBSD cv_timedwait requires a relative timeout. That applies both to the kernel illumos compatibility code and to the userland "fake kernel" code. MFC after: 2 weeks Sponsored by: Panzura Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Wed Feb 20 11:58:40 2019 (r344358) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Wed Feb 20 13:19:08 2019 (r344359) @@ -79,8 +79,13 @@ again: if ((t = tq->tq_freelist) != NULL && tq->tq_nal * immediately retry the allocation. */ tq->tq_maxalloc_wait++; +#ifdef __FreeBSD__ rv = cv_timedwait(&tq->tq_maxalloc_cv, + &tq->tq_lock, hz); +#else + rv = cv_timedwait(&tq->tq_maxalloc_cv, &tq->tq_lock, ddi_get_lbolt() + hz); +#endif tq->tq_maxalloc_wait--; if (rv > 0) goto again; /* signaled */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902201319.x1KDJ82E011375>