summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/modctl.c
diff options
context:
space:
mode:
authorRafael Vanoni <rafael.vanoni@sun.com>2009-11-13 01:32:32 -0800
committerRafael Vanoni <rafael.vanoni@sun.com>2009-11-13 01:32:32 -0800
commitd3d50737e566cade9a08d73d2af95105ac7cd960 (patch)
tree399b76a3f6bf107e2ff506d8f9c3333654b29fc7 /usr/src/uts/common/os/modctl.c
parent1eff5f7761619411b3c31280fcd96cefc32968b7 (diff)
downloadillumos-gate-d3d50737e566cade9a08d73d2af95105ac7cd960.tar.gz
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>
Diffstat (limited to 'usr/src/uts/common/os/modctl.c')
-rw-r--r--usr/src/uts/common/os/modctl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/src/uts/common/os/modctl.c b/usr/src/uts/common/os/modctl.c
index 1ddec74d87..93d620d0cd 100644
--- a/usr/src/uts/common/os/modctl.c
+++ b/usr/src/uts/common/os/modctl.c
@@ -3875,7 +3875,7 @@ void
mod_uninstall_daemon(void)
{
callb_cpr_t cprinfo;
- clock_t ticks = 0;
+ clock_t ticks;
mod_aul_thread = curthread;
@@ -3890,10 +3890,9 @@ mod_uninstall_daemon(void)
* the default for a non-DEBUG kernel.
*/
if (mod_uninstall_interval) {
- ticks = ddi_get_lbolt() +
- drv_usectohz(mod_uninstall_interval * 1000000);
- (void) cv_timedwait(&mod_uninstall_cv,
- &mod_uninstall_lock, ticks);
+ ticks = drv_usectohz(mod_uninstall_interval * 1000000);
+ (void) cv_reltimedwait(&mod_uninstall_cv,
+ &mod_uninstall_lock, ticks, TR_CLOCK_TICK);
} else {
cv_wait(&mod_uninstall_cv, &mod_uninstall_lock);
}