aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic/mutex-dec.h
AgeCommit message (Collapse)Author
2006-01-11Fix mutex_trylock() copy-and-paste bug (x86, x86-64, generic mutex-dec.h)Linus Torvalds
Noticed by Arjan originally on x86-64, then Ingo on x86, and finally me grepping for it in the generic version. Bad parenthesis nesting. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09[PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementationsIngo Molnar
Add three (generic) mutex fastpath implementations. The mutex-xchg.h implementation is atomic_xchg() based, and should work fine on every architecture. The mutex-dec.h implementation is atomic_dec_return() based - this one too should work on every architecture, but might not perform the most optimally on architectures that have no atomic-dec/inc instructions. The mutex-null.h implementation forces all calls into the slowpath. This is used for mutex debugging, but it can also be used on platforms that do not want (or need) a fastpath at all. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@infradead.org>