summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/clock.c
diff options
context:
space:
mode:
authoreota <none@none>2007-09-20 14:16:47 -0700
committereota <none@none>2007-09-20 14:16:47 -0700
commitdd4eeefdb8e4583c47e28a7f315db6087931ef06 (patch)
tree42d484ac74ab436d78007be666c66d144c55890b /usr/src/uts/common/os/clock.c
parent55c4b5faaa3d3ff8bea0d08505e7ea0850b949e8 (diff)
downloadillumos-joyent-dd4eeefdb8e4583c47e28a7f315db6087931ef06.tar.gz
PSARC 2007/402 Driver Periodic Timeouts
4977787 Official DDI interface is required for periodic timeout requests
Diffstat (limited to 'usr/src/uts/common/os/clock.c')
-rw-r--r--usr/src/uts/common/os/clock.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/uts/common/os/clock.c b/usr/src/uts/common/os/clock.c
index 669c8d6886..290506962e 100644
--- a/usr/src/uts/common/os/clock.c
+++ b/usr/src/uts/common/os/clock.c
@@ -67,6 +67,7 @@
#include <sys/rctl.h>
#include <sys/task.h>
#include <sys/sdt.h>
+#include <sys/ddi_timer.h>
/*
* for NTP support
@@ -1045,6 +1046,18 @@ clock_init(void)
mutex_enter(&cpu_lock);
clock_cyclic = cyclic_add(&hdlr, &when);
mutex_exit(&cpu_lock);
+
+ /*
+ * cyclic_timer is dedicated to the ddi interface, which
+ * uses the same clock resolution as the system one.
+ */
+ hdlr.cyh_func = (cyc_func_t)cyclic_timer;
+ hdlr.cyh_level = CY_LOCK_LEVEL;
+ hdlr.cyh_arg = NULL;
+
+ mutex_enter(&cpu_lock);
+ clock_cyclic = cyclic_add(&hdlr, &when);
+ mutex_exit(&cpu_lock);
}
/*