PSARC/2009/396 Tickless Kernel Architecture / lbolt decoupling
6860030 tickless clock requires a clock() decoupled lbolt / lbolt64
Portions contributed by Chad Mynhier <cmynhier@gmail.com>
diff --git a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
index 9b806d0..98cb194 100644
--- a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
+++ b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
@@ -311,11 +311,8 @@
*/
error = cv_wait_sig(&so->so_snd_cv, &so->so_lock);
} else {
- clock_t now;
-
- time_to_wait(&now, so->so_sndtimeo);
- error = cv_timedwait_sig(&so->so_snd_cv, &so->so_lock,
- now);
+ error = cv_reltimedwait_sig(&so->so_snd_cv,
+ &so->so_lock, so->so_sndtimeo, TR_CLOCK_TICK);
}
if (error == 0)
return (EINTR);
@@ -971,10 +968,9 @@
error = cv_wait_sig(&so->so_rcv_cv,
&so->so_lock);
} else {
- clock_t now;
- time_to_wait(&now, so->so_rcvtimeo);
- error = cv_timedwait_sig(&so->so_rcv_cv,
- &so->so_lock, now);
+ error = cv_reltimedwait_sig(
+ &so->so_rcv_cv, &so->so_lock,
+ so->so_rcvtimeo, TR_CLOCK_TICK);
}
so->so_rcv_wakeup = B_FALSE;
so->so_rcv_wanted = 0;
@@ -1558,6 +1554,7 @@
int retval;
int count = 0;
mblk_t *mp;
+ clock_t wakeup = drv_usectohz(10);
if (so->so_downcalls == NULL ||
so->so_downcalls->sd_recv_uio != NULL)
@@ -1575,8 +1572,8 @@
so->so_flag |= SOWANT;
/* Do a timed sleep, in case the reader goes to sleep. */
- (void) cv_timedwait(&so->so_state_cv, &so->so_lock,
- lbolt + drv_usectohz(10));
+ (void) cv_reltimedwait(&so->so_state_cv, &so->so_lock, wakeup,
+ TR_CLOCK_TICK);
}
/*