summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2004-07-28 17:15:13 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2004-07-28 17:15:13 +0000
commitc65eb6dac1a01e8aedf3be76a030db86be9264f4 (patch)
treea775e61964a48db2019d60bb802076883a9b047b /sys/kern/kern_sysctl.c
parent953666701c83d79c01d0ce862cd14f2120a66b7c (diff)
This touches only MI code, and adds new time keeping code. The
code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 4b83109ba96..9599fe397ad 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.117 2004/06/28 01:34:46 aaron Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.118 2004/07/28 17:15:12 tholo Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -62,6 +62,9 @@
#include <sys/exec.h>
#include <sys/mbuf.h>
#include <sys/sensors.h>
+#ifdef __HAVE_TIMECOUNTER
+#include <sys/timetc.h>
+#endif
#ifdef __HAVE_EVCOUNT
#include <sys/evcount.h>
#endif
@@ -285,6 +288,9 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
#ifdef __HAVE_EVCOUNT
case KERN_EVCOUNT:
#endif
+#ifdef __HAVE_TIMECOUNTER
+ case KERN_TIMECOUNTER:
+#endif
break;
default:
return (ENOTDIR); /* overloaded */
@@ -528,6 +534,11 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (evcount_sysctl(name + 1, namelen - 1, oldp, oldlenp,
newp, newlen));
#endif
+#ifdef __HAVE_TIMECOUNTER
+ case KERN_TIMECOUNTER:
+ return (sysctl_tc(name + 1, namelen - 1, oldp, oldlenp,
+ newp, newlen));
+#endif
default:
return (EOPNOTSUPP);
}