diff options
Diffstat (limited to 'arch/um/sys-i386/delay.c')
-rw-r--r-- | arch/um/sys-i386/delay.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/um/sys-i386/delay.c b/arch/um/sys-i386/delay.c index 20d37dbbaf08..2c11b9770e8b 100644 --- a/arch/um/sys-i386/delay.c +++ b/arch/um/sys-i386/delay.c @@ -1,3 +1,8 @@ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/delay.h> +#include <asm/param.h> + void __delay(unsigned long time) { /* Stolen from the i386 __loop_delay */ @@ -12,3 +17,24 @@ void __delay(unsigned long time) :"0" (time)); } +void __udelay(unsigned long usecs) +{ + int i, n; + + n = (loops_per_jiffy * HZ * usecs) / MILLION; + for(i=0;i<n;i++) + cpu_relax(); +} + +EXPORT_SYMBOL(__udelay); + +void __const_udelay(unsigned long usecs) +{ + int i, n; + + n = (loops_per_jiffy * HZ * usecs) / MILLION; + for(i=0;i<n;i++) + cpu_relax(); +} + +EXPORT_SYMBOL(__const_udelay); |