aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorChen, Kenneth W <kenneth.w.chen@intel.com>2006-04-07 20:12:54 -0400
committerTony Luck <tony.luck@intel.com>2006-04-08 01:39:49 -0400
commitcfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55 (patch)
treee7dd4bbb97374b758bcb169b635b997c12893565 /include/asm-ia64
parent0681226661754a99de711cda2c2bd12ff9cd2c3b (diff)
[IA64] fix bug in ia64 __mutex_fastpath_trylock
The parenthesis around "likely" used in ia64 __mutex_fastpath_trylock is incorrect, and it leads to broken mutex_trylock. Here is the patch that fixed the bug. I removed the likely altogether because there is no branch and gcc does a reasonable job at predicating the return value. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h
index 5a3224f6af38..bed73a643a56 100644
--- a/include/asm-ia64/mutex.h
+++ b/include/asm-ia64/mutex.h
@@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
84static inline int 84static inline int
85__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) 85__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
86{ 86{
87 if (likely(cmpxchg_acq(count, 1, 0)) == 1) 87 if (cmpxchg_acq(count, 1, 0) == 1)
88 return 1; 88 return 1;
89 return 0; 89 return 0;
90} 90}