projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34596dc
)
[PATCH] Use early clobber in semaphores
author
Andi Kleen
<ak@suse.de>
Fri, 29 Sep 2006 23:47:55 +0000
(
01:47
+0200)
committer
Andi Kleen
<andi@basil.nowhere.org>
Fri, 29 Sep 2006 23:47:55 +0000
(
01:47
+0200)
New code clobbers the result always early, so tell gcc about it
Signed-off-by: Andi Kleen <ak@suse.de>
include/asm-x86_64/semaphore.h
patch
|
blob
|
blame
|
history
diff --git
a/include/asm-x86_64/semaphore.h
b/include/asm-x86_64/semaphore.h
index 107bd90429e86e14e47185895d9ab222be3b0652..1194888536b93736f3d2616c6cb4eddfd2803e56 100644
(file)
--- 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;