]> 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, 5 Oct 2012 04:01:03 +0000 (14:01 +1000)
commitfa631d286b951b671caf6f3e1adc1c6a83fcb0ca
tree88a8176109b222ef65eac8ea41342c820f33dd72
parent1b8f4f0e025e96f3f5369df90823dbe9e5a4c7ff
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