diff options
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzpool/common/kernel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c index e0f6422..ca68ca1 100644 --- a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c +++ b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c @@ -308,9 +308,9 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime) struct timeval tv; clock_t delta; - ASSERT(abstime > 0); + abstime += lbolt; top: - delta = abstime; + delta = abstime - lbolt; if (delta <= 0) return (-1); @@ -321,7 +321,7 @@ top: ts.tv_nsec = tv.tv_usec * 1000 + (delta % hz) * (NANOSEC / hz); ASSERT(ts.tv_nsec >= 0); - if(ts.tv_nsec >= NANOSEC) { + if (ts.tv_nsec >= NANOSEC) { ts.tv_sec++; ts.tv_nsec -= NANOSEC; } |