commit | 0b2fcfdb8b4e7e379192f24ea2203163ddf5df1d | [log] [tgz] |
---|---|---|
author | Nick Piggin <[email protected]> | Thu Mar 23 03:01:02 2006 -0800 |
committer | Linus Torvalds <[email protected]> | Thu Mar 23 07:38:17 2006 -0800 |
tree | 1f3995e41ab12ff76e737389e0b59a40c0c73668 | |
parent | 713729e8b993cb880225e2ced50a3f5ac05c2b3f [diff] |
[PATCH] atomic: add_unless cmpxchg optimise Without branch hints, the very unlikely chance of the loop repeating due to cmpxchg failure is unrolled with gcc-4 that I have tested. Improve this for architectures with a native cas/cmpxchg. llsc archs should try to implement this natively. Signed-off-by: Nick Piggin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Roman Zippel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>