ia64/linux-2.6.18-xen.hg

view arch/um/sys-i386/delay.c @ 647:a5bb490065f6

Fix the build after public header sync.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 13 14:01:49 2008 +0100 (2008-08-13)
parents 831230e53067
children
line source
1 #include <linux/module.h>
2 #include <linux/kernel.h>
3 #include <linux/delay.h>
4 #include <asm/param.h>
6 void __delay(unsigned long time)
7 {
8 /* Stolen from the i386 __loop_delay */
9 int d0;
10 __asm__ __volatile__(
11 "\tjmp 1f\n"
12 ".align 16\n"
13 "1:\tjmp 2f\n"
14 ".align 16\n"
15 "2:\tdecl %0\n\tjns 2b"
16 :"=&a" (d0)
17 :"0" (time));
18 }
20 void __udelay(unsigned long usecs)
21 {
22 int i, n;
24 n = (loops_per_jiffy * HZ * usecs) / MILLION;
25 for(i=0;i<n;i++)
26 cpu_relax();
27 }
29 EXPORT_SYMBOL(__udelay);
31 void __const_udelay(unsigned long usecs)
32 {
33 int i, n;
35 n = (loops_per_jiffy * HZ * usecs) / MILLION;
36 for(i=0;i<n;i++)
37 cpu_relax();
38 }
40 EXPORT_SYMBOL(__const_udelay);