Author: avg
Date: Thu Jun  6 11:32:39 2019
New Revision: 348731
URL: https://svnweb.freebsd.org/changeset/base/348731

Log:
  MFC r344359: 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.
  
  Sponsored by: Panzura

Modified:
  stable/12/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
==============================================================================
--- stable/12/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c      Thu Jun 
 6 08:43:23 2019        (r348730)
+++ stable/12/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c      Thu Jun 
 6 11:32:39 2019        (r348731)
@@ -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