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

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

diff -u --recursive --new-file v2.1.36/linux/arch/i386/lib/semaphore.S linux/arch/i386/lib/semaphore.S
@@ -13,28 +13,31 @@
  * there is contention on the semaphore.
  */
 ENTRY(__down_failed)
-	pushl %eax	/* return address */
+	pushl %eax	/* save %eax */
 	pushl %edx	/* save %edx */
 	pushl %ecx	/* save %ecx (and argument) */
 	call SYMBOL_NAME(__down)
 	popl %ecx	/* restore %ecx (count on __down not changing it) */
 	popl %edx	/* restore %edx */
+	popl %eax	/* restore %eax */
 	ret
 
 ENTRY(__down_failed_interruptible)
-	pushl %eax	/* return address */
+	pushl %eax	/* save %eax */
 	pushl %edx	/* save %edx */
 	pushl %ecx	/* save %ecx (and argument) */
 	call SYMBOL_NAME(__down_interruptible)
 	popl %ecx	/* restore %ecx (count on __down_interruptible not changing it) */
 	popl %edx	/* restore %edx */
+	popl %eax	/* restore %eax */
 	ret
 
 ENTRY(__up_wakeup)
-	pushl %eax	/* return address */
+	pushl %eax	/* save %eax */
 	pushl %edx	/* save %edx */
 	pushl %ecx	/* save %ecx (and argument) */
 	call SYMBOL_NAME(__up)
 	popl %ecx	/* restore %ecx (count on __up not changing it) */
 	popl %edx	/* restore %edx */
+	popl %eax	/* restore %eax */
 	ret

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