summaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/semaphore.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-30 01:47:55 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-30 01:47:55 +0200
commitc84ef5305930d19bdd6cd576b3a3a73786a82e57 (patch)
tree26f9b94efa67ce79cf89dee251ac519804cab793 /include/asm-x86_64/semaphore.h
parent[PATCH] Define vsyscall cache as blob to make clearer that user space shouldn... (diff)
downloadlinux-c84ef5305930d19bdd6cd576b3a3a73786a82e57.tar.xz
linux-c84ef5305930d19bdd6cd576b3a3a73786a82e57.zip
[PATCH] Use early clobber in semaphores
New code clobbers the result always early, so tell gcc about it Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-x86_64/semaphore.h')
-rw-r--r--include/asm-x86_64/semaphore.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86_64/semaphore.h b/include/asm-x86_64/semaphore.h
index 107bd90429e8..1194888536b9 100644
--- a/include/asm-x86_64/semaphore.h
+++ b/include/asm-x86_64/semaphore.h
@@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem)
"jns 2f\n\t"
"call __down_failed_interruptible\n"
"2:\n"
- :"=a" (result), "=m" (sem->count)
+ :"=&a" (result), "=m" (sem->count)
:"D" (sem)
:"memory");
return result;
@@ -153,7 +153,7 @@ static inline int down_trylock(struct semaphore * sem)
"jns 2f\n\t"
"call __down_failed_trylock\n\t"
"2:\n"
- :"=a" (result), "=m" (sem->count)
+ :"=&a" (result), "=m" (sem->count)
:"D" (sem)
:"memory","cc");
return result;