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 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to