]> git.karo-electronics.de Git - karo-tx-linux.git/commit
atomic: implement generic atomic_dec_if_positive()
authorShaohua Li <shli@kernel.org>
Fri, 28 Sep 2012 00:19:41 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Sep 2012 06:07:46 +0000 (16:07 +1000)
commitbb61287f81fffcbe8fc5beb1a083df215d44bc9d
tree5106a12ef64b9ed814806cfd449749cf8e98f9ac
parentc4cdfb64ebbc4adee405562e2c8083a534915dd7
atomic: implement generic atomic_dec_if_positive()

The x86 implementation of atomic_dec_if_positive is quite generic, so make
it available to all architectures.

This is needed for "swap: add a simple detector for inappropriate swapin
readahead".

Signed-off-by: Shaohua Li <shli@fusionio.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/microblaze/include/asm/atomic.h
arch/powerpc/include/asm/atomic.h
arch/x86/include/asm/atomic.h
include/linux/atomic.h