ia64/kvm: compilation fix. export account_system_vtime.
[pv_ops_mirror.git] / arch / um / sys-i386 / delay.c
blobd623e074f41d8c96bf4cb3d5af50a63f3d039255
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)
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));
20 void __udelay(unsigned long usecs)
22 int i, n;
24 n = (loops_per_jiffy * HZ * usecs) / MILLION;
25 for(i=0;i<n;i++)
26 cpu_relax();
29 EXPORT_SYMBOL(__udelay);