summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/clock.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-11-05 22:51:17 +0000
committerbde <bde@FreeBSD.org>1994-11-05 22:51:17 +0000
commit87ae338cf9c21af119b6cb92e5e2a7f7d02baae2 (patch)
tree99b10f7d25ea74c3f8d3ab1041f2e9a77b067b89 /sys/i386/include/clock.h
parent419fa2fad74e310fca8461dfd7f6abac7880bfd5 (diff)
downloadFreeBSD-src-87ae338cf9c21af119b6cb92e5e2a7f7d02baae2.zip
FreeBSD-src-87ae338cf9c21af119b6cb92e5e2a7f7d02baae2.tar.gz
Declare the full uglyness of the interfaces to the clock driver (except
things declared in machine-independent files).
Diffstat (limited to 'sys/i386/include/clock.h')
-rw-r--r--sys/i386/include/clock.h52
1 files changed, 46 insertions, 6 deletions
diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h
index 63bfae9..33f8e74 100644
--- a/sys/i386/include/clock.h
+++ b/sys/i386/include/clock.h
@@ -5,11 +5,7 @@
*/
#ifndef _MACHINE_CLOCK_H_
-#define _MACHINE_CLOCK_H_ 1
-
-void inittodr(time_t base);
-
-extern int pentium_mhz;
+#define _MACHINE_CLOCK_H_
#ifdef I586_CPU
/*
@@ -48,4 +44,48 @@ extern int pentium_mhz;
(*(otime) = *(ntime))
#endif
-#endif /* _MACHINE_CLOCK_H_ */
+#if defined(KERNEL) && !defined(LOCORE)
+#include <sys/cdefs.h>
+#include <machine/frame.h>
+
+/*
+ * Kernel to clock driver interface.
+ */
+void inittodr __P((time_t base));
+void resettodr __P((void));
+void startrtclock __P((void));
+
+/*
+ * i386 to clock driver interface.
+ * XXX almost all of it is misplaced. i586 stuff is done in isa/clock.c
+ * and isa stuff is done in i386/microtime.s and i386/support.s.
+ */
+extern int adjkerntz;
+extern int disable_rtc_set;
+#ifdef I586_CPU
+extern int pentium_mhz;
+#endif
+extern int timer0_max_count;
+extern u_int timer0_overflow_threshold;
+extern u_int timer0_prescaler_count;
+
+#ifdef I586_CPU
+void calibrate_cyclecounter __P((void));
+#endif
+void clkintr __P((struct clockframe frame));
+void rtcintr __P((struct clockframe frame));
+
+/*
+ * Driver to clock driver interface.
+ */
+void DELAY __P((int usec));
+int acquire_timer0 __P((int rate,
+ void (*function)(struct clockframe *frame)));
+int acquire_timer2 __P((int mode));
+int release_timer0 __P((void));
+int release_timer2 __P((void));
+int sysbeep __P((int pitch, int period));
+
+#endif /* KERNEL && !LOCORE */
+
+#endif /* !_MACHINE_CLOCK_H_ */
OpenPOWER on IntegriCloud