diff options
author | Chen, Kenneth W <kenneth.w.chen@intel.com> | 2006-04-07 20:12:54 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-04-08 01:39:49 -0400 |
commit | cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55 (patch) | |
tree | e7dd4bbb97374b758bcb169b635b997c12893565 /include/asm-ia64/mutex.h | |
parent | 0681226661754a99de711cda2c2bd12ff9cd2c3b (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/mutex.h')
-rw-r--r-- | include/asm-ia64/mutex.h | 2 |
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 *)) | |||
84 | static inline int | 84 | static 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 | } |