diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-08-12 12:44:30 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-12 12:44:30 +0300 |
commit | f52609fdabb1c726f8b9fdf64df3161781aa186e (patch) | |
tree | 3b7d4a47505eddb097bab848a8ffdc4bbbf79bb7 /arch/avr32 | |
parent | 20f9ed1568c00bbd9e6af31341d25e06bc3d4a16 (diff) | |
parent | 41b9e9fcc1c44b84a785115058ce9c703e3fca6e (diff) | |
download | linux-f52609fdabb1c726f8b9fdf64df3161781aa186e.tar.xz |
Merge branch 'locking/arch-atomic' into locking/core, because it's ready for upstream
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/include/asm/atomic.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/avr32/include/asm/atomic.h b/arch/avr32/include/asm/atomic.h index 2d07ce1c5327..97c9bdf83409 100644 --- a/arch/avr32/include/asm/atomic.h +++ b/arch/avr32/include/asm/atomic.h @@ -44,6 +44,18 @@ static inline int __atomic_##op##_return(int i, atomic_t *v) \ ATOMIC_OP_RETURN(sub, sub, rKs21) ATOMIC_OP_RETURN(add, add, r) +#define ATOMIC_OP(op, asm_op) \ +ATOMIC_OP_RETURN(op, asm_op, r) \ +static inline void atomic_##op(int i, atomic_t *v) \ +{ \ + (void)__atomic_##op##_return(i, v); \ +} + +ATOMIC_OP(and, and) +ATOMIC_OP(or, or) +ATOMIC_OP(xor, eor) + +#undef ATOMIC_OP #undef ATOMIC_OP_RETURN /* |