atomic: Provide atomic_{or,xor,and}

Implement atomic logic ops -- atomic_{or,xor,and}.

These will replace the atomic_{set,clear}_mask functions that are
available on some archs.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Peter Zijlstra
2014-04-23 19:32:50 +02:00
committed by Thomas Gleixner
parent 2957c03539
commit e6942b7de2
29 changed files with 19 additions and 68 deletions

View File

@@ -17,8 +17,6 @@
#include <asm/barrier.h>
#include <asm-generic/atomic64.h>
#define CONFIG_ARCH_HAS_ATOMIC_OR
#define ATOMIC_INIT(i) { (i) }
int atomic_add_return(int, atomic_t *);

View File

@@ -33,8 +33,6 @@ long atomic64_##op##_return(long, atomic64_t *);
ATOMIC_OPS(add)
ATOMIC_OPS(sub)
#define CONFIG_ARCH_HAS_ATOMIC_OR
ATOMIC_OP(and)
ATOMIC_OP(or)
ATOMIC_OP(xor)