diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-04-23 13:32:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-27 08:06:24 -0400 |
commit | e6942b7de2dfe44ebde9bae57dadece5abca9de8 (patch) | |
tree | b235317c5f6d200bcc25b43a406237a0d15319cf /lib/atomic64.c | |
parent | 2957c035395e492463d7f589af9dd32388967bbb (diff) |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/atomic64.c b/lib/atomic64.c index 1298c05ef528..2886ebac6567 100644 --- a/lib/atomic64.c +++ b/lib/atomic64.c | |||
@@ -102,6 +102,9 @@ EXPORT_SYMBOL(atomic64_##op##_return); | |||
102 | 102 | ||
103 | ATOMIC64_OPS(add, +=) | 103 | ATOMIC64_OPS(add, +=) |
104 | ATOMIC64_OPS(sub, -=) | 104 | ATOMIC64_OPS(sub, -=) |
105 | ATOMIC64_OP(and, &=) | ||
106 | ATOMIC64_OP(or, |=) | ||
107 | ATOMIC64_OP(xor, ^=) | ||
105 | 108 | ||
106 | #undef ATOMIC64_OPS | 109 | #undef ATOMIC64_OPS |
107 | #undef ATOMIC64_OP_RETURN | 110 | #undef ATOMIC64_OP_RETURN |