[PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementations
authorIngo Molnar <mingo@elte.hu>
Mon, 9 Jan 2006 23:59:17 +0000 (15:59 -0800)
committerIngo Molnar <mingo@hera.kernel.org>
Mon, 9 Jan 2006 23:59:17 +0000 (15:59 -0800)
commit620a6fd185c084aa617c411f711533f01ea673c9
tree3ab1a296a2cd952bc3dd602fc5dd2ada9288b2c4
parent711a660dc2064013a2b0167ee67389707fc9cac3
[PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementations

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>
include/asm-generic/mutex-dec.h [new file with mode: 0644]
include/asm-generic/mutex-null.h [new file with mode: 0644]
include/asm-generic/mutex-xchg.h [new file with mode: 0644]