Skip to content

Commit

Permalink
[IA64] fix bug in ia64 __mutex_fastpath_trylock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chen, Kenneth W authored and Tony Luck committed Apr 8, 2006
1 parent 0681226 commit cfab9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-ia64/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
static inline int
__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
{
if (likely(cmpxchg_acq(count, 1, 0)) == 1)
if (cmpxchg_acq(count, 1, 0) == 1)
return 1;
return 0;
}
Expand Down

0 comments on commit cfab9d0

Please sign in to comment.