linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / asm-i386 / semaphore.h
index d51e800..6a42b21 100644 (file)
@@ -99,7 +99,7 @@ static inline void down(struct semaphore * sem)
        might_sleep();
        __asm__ __volatile__(
                "# atomic down operation\n\t"
-               LOCK_PREFIX "decl %0\n\t"     /* --sem->count */
+               LOCK "decl %0\n\t"     /* --sem->count */
                "js 2f\n"
                "1:\n"
                LOCK_SECTION_START("")
@@ -107,7 +107,7 @@ static inline void down(struct semaphore * sem)
                "call __down_failed\n\t"
                "jmp 1b\n"
                LOCK_SECTION_END
-               :"+m" (sem->count)
+               :"=m" (sem->count)
                :
                :"memory","ax");
 }
@@ -123,7 +123,7 @@ static inline int down_interruptible(struct semaphore * sem)
        might_sleep();
        __asm__ __volatile__(
                "# atomic interruptible down operation\n\t"
-               LOCK_PREFIX "decl %1\n\t"     /* --sem->count */
+               LOCK "decl %1\n\t"     /* --sem->count */
                "js 2f\n\t"
                "xorl %0,%0\n"
                "1:\n"
@@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem)
                "call __down_failed_interruptible\n\t"
                "jmp 1b\n"
                LOCK_SECTION_END
-               :"=a" (result), "+m" (sem->count)
+               :"=a" (result), "=m" (sem->count)
                :
                :"memory");
        return result;
@@ -148,7 +148,7 @@ static inline int down_trylock(struct semaphore * sem)
 
        __asm__ __volatile__(
                "# atomic interruptible down operation\n\t"
-               LOCK_PREFIX "decl %1\n\t"     /* --sem->count */
+               LOCK "decl %1\n\t"     /* --sem->count */
                "js 2f\n\t"
                "xorl %0,%0\n"
                "1:\n"
@@ -157,7 +157,7 @@ static inline int down_trylock(struct semaphore * sem)
                "call __down_failed_trylock\n\t"
                "jmp 1b\n"
                LOCK_SECTION_END
-               :"=a" (result), "+m" (sem->count)
+               :"=a" (result), "=m" (sem->count)
                :
                :"memory");
        return result;
@@ -173,7 +173,7 @@ static inline void up(struct semaphore * sem)
 {
        __asm__ __volatile__(
                "# atomic up operation\n\t"
-               LOCK_PREFIX "incl %0\n\t"     /* ++sem->count */
+               LOCK "incl %0\n\t"     /* ++sem->count */
                "jle 2f\n"
                "1:\n"
                LOCK_SECTION_START("")
@@ -182,7 +182,7 @@ static inline void up(struct semaphore * sem)
                "jmp 1b\n"
                LOCK_SECTION_END
                ".subsection 0\n"
-               :"+m" (sem->count)
+               :"=m" (sem->count)
                :
                :"memory","ax");
 }