summaryrefslogtreecommitdiffstats
path: root/include/asm-i386/semaphore.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-27 21:38:56 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 23:39:51 +0200
commit00463c1633b6d6a2178d2dc794c0a70ac2f9ce6b (patch)
tree83d02451139608ad70fb33c5f0e3bb90019841b2 /include/asm-i386/semaphore.h
parentMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/... (diff)
downloadlinux-00463c1633b6d6a2178d2dc794c0a70ac2f9ce6b.tar.xz
linux-00463c1633b6d6a2178d2dc794c0a70ac2f9ce6b.zip
[PATCH] i386: Use early clobbers for semaphores now
The new code does clobber the result early, so make sure to tell gcc to not put it into the same register as a input argument Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andrew Morton <akpm@osdl.org> Acked-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/semaphore.h')
-rw-r--r--include/asm-i386/semaphore.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h
index e63b6a68f04c..4e34a468c383 100644
--- a/include/asm-i386/semaphore.h
+++ b/include/asm-i386/semaphore.h
@@ -126,7 +126,7 @@ static inline int down_interruptible(struct semaphore * sem)
"lea %1,%%eax\n\t"
"call __down_failed_interruptible\n"
"2:"
- :"=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)
"lea %1,%%eax\n\t"
"call __down_failed_trylock\n\t"
"2:\n"
- :"=a" (result), "+m" (sem->count)
+ :"=&a" (result), "+m" (sem->count)
:
:"memory");
return result;