FreeBSD/Linux Kernel Cross Reference
sys/i386at/clockpit.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: clockpit.h,v $
29 * Revision 2.2 93/11/17 16:42:11 dbg
30 * Merged into mainline.
31 *
32 * Created
33 * [92/06/22 savage]
34 *
35 */
36
37 #ifndef _I386AT_CLOCKPIT_H_
38 #define _I386AT_CLOCKPIT_H_
39
40 #include <i386/mach_param.h> /* for default HZ */
41 #include <mach/time_spec.h>
42
43 io_return_t clockpitprobe();
44 io_return_t clockpitattach();
45 io_return_t clockpitopen();
46 io_return_t clockpitopen();
47 io_return_t clockpitgetstat();
48 io_return_t clockpitsetstat();
49 io_return_t clockpitmmap();
50 int clockrtsetresolution();
51
52 /*
53 * Adjust for PIT clock round off... Ugly, but true...
54 */
55 #define CLOCKPIT_SKEW(res) (((CLKNUM%(NANOSEC_PER_SEC/res)) \
56 * res) / CLKNUM)
57 #define CLOCKPIT_DEFAULT_RESOLUTION (NANOSEC_PER_SEC/HZ - \
58 CLOCKPIT_SKEW((NANOSEC_PER_SEC/HZ)))
59
60 #define CLOCKPIT_MAX_RESOLUTION (10000000)
61
62 /*
63 * Minimum set to 1/2 a millisecond... if you want to play with lower
64 * then change this number.
65 */
66 #define CLOCKPIT_MIN_RESOLUTION (500000)
67
68
69 #endif /* _I386AT_CLOCKPIT_H_ */
70
Cache object: 954de5a4bc7836004af7564f32463009
|