patch-2.0.19 linux/arch/i386/lib/semaphore.S

Next file: linux/arch/i386/mm/fault.c
Previous file: linux/arch/i386/lib/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.18/linux/arch/i386/lib/semaphore.S linux/arch/i386/lib/semaphore.S
@@ -0,0 +1,31 @@
+/*
+ *  linux/arch/i386/lib/semaphore.S
+ *
+ *  Copyright (C) 1996  Linus Torvalds
+ */
+
+#include <linux/linkage.h>
+
+/*
+ * "down_failed" is called with the eventual return address
+ * in %eax, and the address of the semaphore in %ecx. We need
+ * to increment the number of waiters on the semaphore,
+ * call "__down()", and then eventually return to try again.
+ */
+.globl down_failed
+ALIGN
+down_failed:
+	pushl %eax
+	pushl %ecx
+	call SYMBOL_NAME(__down)
+	popl %ecx
+	ret
+
+.globl up_wakeup
+ALIGN
+up_wakeup:
+	pushl %eax
+	pushl %ecx
+	call SYMBOL_NAME(__up)
+	popl %ecx
+	ret

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov