ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / i386 / kernel / timers / timer_none.c
1 #include <linux/init.h>
2 #include <asm/timer.h>
3
4 static int __init init_none(char* override)
5 {
6         return 0;
7 }
8
9 static void mark_offset_none(void)
10 {
11         /* nothing needed */
12 }
13
14 static unsigned long get_offset_none(void)
15 {
16         return 0;
17 }
18
19 static unsigned long long monotonic_clock_none(void)
20 {
21         return 0;
22 }
23
24 static void delay_none(unsigned long loops)
25 {
26         int d0;
27         __asm__ __volatile__(
28                 "\tjmp 1f\n"
29                 ".align 16\n"
30                 "1:\tjmp 2f\n"
31                 ".align 16\n"
32                 "2:\tdecl %0\n\tjns 2b"
33                 :"=&a" (d0)
34                 :"0" (loops));
35 }
36
37 /* tsc timer_opts struct */
38 struct timer_opts timer_none = {
39         .name =         "none",
40         .init =         init_none, 
41         .mark_offset =  mark_offset_none, 
42         .get_offset =   get_offset_none,
43         .monotonic_clock =      monotonic_clock_none,
44         .delay = delay_none,
45 };