summaryrefslogtreecommitdiffstats
path: root/arch/um/sys-i386/delay.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/sys-i386/delay.c')
-rw-r--r--arch/um/sys-i386/delay.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/um/sys-i386/delay.c b/arch/um/sys-i386/delay.c
new file mode 100644
index 0000000..20d37db
--- /dev/null
+++ b/arch/um/sys-i386/delay.c
@@ -0,0 +1,14 @@
+void __delay(unsigned long time)
+{
+ /* Stolen from the i386 __loop_delay */
+ int d0;
+ __asm__ __volatile__(
+ "\tjmp 1f\n"
+ ".align 16\n"
+ "1:\tjmp 2f\n"
+ ".align 16\n"
+ "2:\tdecl %0\n\tjns 2b"
+ :"=&a" (d0)
+ :"0" (time));
+}
+
OpenPOWER on IntegriCloud