summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/mutex-dec.h
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] mutex: some cleanupsNicolas Pitre2006-03-311-14/+16
| | | | | | | | | | Turn some macros into inline functions and add proper type checking as well as being more readable. Also a minor comment adjustment. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Fix mutex_trylock() copy-and-paste bug (x86, x86-64, generic mutex-dec.h)Linus Torvalds2006-01-111-1/+1
| | | | | | | | | 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>
* [PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementationsIngo Molnar2006-01-091-0/+110
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>
OpenPOWER on IntegriCloud