]> 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>
Thu, 4 Oct 2012 05:03:27 +0000 (15:03 +1000)
commitceb1cdf1602fe44f0a8e539eecf28522dd18abae
tree6f4a867b53bf3b9ed18aa6acb9bf73c3eb15cd0f
parent1461a34a166c28aa916f7ae5d20dac137d3e4c56
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