kernel - Factor out TSC cputimer into common x86_64 code, use for vkernel.
[dragonfly.git] / sys / platform / vkernel64 / include / clock.h
blobf3f4e3a47eebf4d436ef54cec966fd108f0fea6c
1 /*
2 * Kernel interface to machine-dependent clock driver.
3 * Garrett Wollman, September 1994.
4 * This file is in the public domain.
6 * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $
7 */
9 #ifndef _MACHINE_CLOCK_H_
10 #define _MACHINE_CLOCK_H_
12 #ifdef _KERNEL
14 #ifndef _SYS_TYPES_H_
15 #include <sys/types.h>
16 #endif
18 typedef uint64_t tsc_uclock_t;
19 typedef int64_t tsc_sclock_t;
22 * x86 to clock driver interface.
23 * XXX large parts of the driver and its interface are misplaced.
25 extern int adjkerntz;
26 extern int disable_rtc_set;
27 extern int tsc_present;
28 extern int tsc_invariant;
29 extern int tsc_mpsync;
30 extern int tsc_is_broken;
31 extern int wall_cmos_clock;
32 extern tsc_uclock_t tsc_frequency;
33 extern tsc_uclock_t tsc_oneus_approx; /* do not use for fine calc, min 1 */
36 * Driver to clock driver interface.
39 int rtcin (int val);
40 int acquire_timer2 (int mode);
41 int release_timer2 (void);
42 int sysbeep (int pitch, int period);
43 void timer_restore (void);
45 #endif /* _KERNEL */
47 #endif /* !_MACHINE_CLOCK_H_ */