summaryrefslogtreecommitdiffstats
path: root/lib/atomic64.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2014-04-23 19:32:50 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-07-27 14:06:24 +0200
commite6942b7de2dfe44ebde9bae57dadece5abca9de8 (patch)
treeb235317c5f6d200bcc25b43a406237a0d15319cf /lib/atomic64.c
parent2957c035395e492463d7f589af9dd32388967bbb (diff)
downloadop-kernel-dev-e6942b7de2dfe44ebde9bae57dadece5abca9de8.zip
op-kernel-dev-e6942b7de2dfe44ebde9bae57dadece5abca9de8.tar.gz
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>
Diffstat (limited to 'lib/atomic64.c')
-rw-r--r--lib/atomic64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/atomic64.c b/lib/atomic64.c
index 1298c05e..2886eba 100644
--- a/lib/atomic64.c
+++ b/lib/atomic64.c
@@ -102,6 +102,9 @@ EXPORT_SYMBOL(atomic64_##op##_return);
ATOMIC64_OPS(add, +=)
ATOMIC64_OPS(sub, -=)
+ATOMIC64_OP(and, &=)
+ATOMIC64_OP(or, |=)
+ATOMIC64_OP(xor, ^=)
#undef ATOMIC64_OPS
#undef ATOMIC64_OP_RETURN
OpenPOWER on IntegriCloud