patch-2.4.21 linux-2.4.21/include/asm-x86_64/semaphore.h

Next file: linux-2.4.21/include/asm-x86_64/smp.h
Previous file: linux-2.4.21/include/asm-x86_64/segment.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-x86_64/semaphore.h linux-2.4.21/include/asm-x86_64/semaphore.h
@@ -124,13 +124,10 @@
 		LOCK "decl %0\n\t"     /* --sem->count */
 		"js 2f\n"
 		"1:\n"
-                ".subsection 1\n" \
-                ".ifndef _text_lock_" __stringify(KBUILD_BASENAME) "\n" \
-                "_text_lock_" __stringify(KBUILD_BASENAME) ":\n" \
-                ".endif\n" \
+		LOCK_SECTION_START("")
 		"2:\tcall __down_failed\n\t"
 		"jmp 1b\n"
-		".subsection 0"
+		LOCK_SECTION_END
 		:"=m" (sem->count)
 		:"D" (sem)
 		:"memory");
@@ -154,13 +151,10 @@
 		"js 2f\n\t"
 		"xorl %0,%0\n"
 		"1:\n"
-                ".subsection 1\n" \
-               ".ifndef _text_lock_" __stringify(KBUILD_BASENAME) "\n" \
-                "_text_lock_" __stringify(KBUILD_BASENAME) ":\n" \
-                ".endif\n" \
+		LOCK_SECTION_START("")
 		"2:\tcall __down_failed_interruptible\n\t"
 		"jmp 1b\n"
-		".subsection 0"
+		LOCK_SECTION_END
 		:"=a" (result), "=m" (sem->count)
 		:"D" (sem)
 		:"memory");
@@ -185,13 +179,10 @@
 		"js 2f\n\t"
 		"xorl %0,%0\n"
 		"1:\n"
-                ".subsection 1\n" \
-                ".ifndef _text_lock_" __stringify(KBUILD_BASENAME) "\n" \
-                "_text_lock_" __stringify(KBUILD_BASENAME) ":\n" \
-                ".endif\n" \
+		LOCK_SECTION_START("")
 		"2:\tcall __down_failed_trylock\n\t"
 		"jmp 1b\n"
-		".subsection 0"
+		LOCK_SECTION_END
 		:"=a" (result), "=m" (sem->count)
 		:"D" (sem)
 		:"memory","cc");
@@ -214,13 +205,10 @@
 		LOCK "incl %0\n\t"     /* ++sem->count */
 		"jle 2f\n"
 		"1:\n"
-                ".subsection 1\n" \
-                ".ifndef _text_lock_" __stringify(KBUILD_BASENAME) "\n" \
-                "_text_lock_" __stringify(KBUILD_BASENAME) ":\n" \
-                ".endif\n" \
+		LOCK_SECTION_START("")
 		"2:\tcall __up_wakeup\n\t"
 		"jmp 1b\n"
-		".subsection 0"
+		LOCK_SECTION_END
 		:"=m" (sem->count)
 		:"D" (sem)
 		:"memory");
@@ -228,7 +216,7 @@
 
 static inline int sem_getcount(struct semaphore *sem)
 {
-       return atomic_read(&sem->count);
+	return atomic_read(&sem->count);
 }
 
 #endif /* __KERNEL__ */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)