Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1180532
| From | Vineet Gupta <Vineet.Gupta1@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] ARC: provide atomic_or() and define ARCH_HAS_ATOMIC_OR |
| Date | 2015-07-09 10:20 +0200 |
| Message-ID | <pKfdL-6cK-15@gated-at.bofh.it> (permalink) |
| References | <pKfdL-6cK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta <vgupta@synopsys.com> --- arch/arc/include/asm/atomic.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h index 03484cb4d16d..fab27dbc562b 100644 --- a/arch/arc/include/asm/atomic.h +++ b/arch/arc/include/asm/atomic.h @@ -141,10 +141,19 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \ ATOMIC_OP(op, c_op, asm_op) \ ATOMIC_OP_RETURN(op, c_op, asm_op) +/* atomic_add(), atomic_add_return() */ ATOMIC_OPS(add, +=, add) + +/* atomic_sub(), atomic_sub_return() */ ATOMIC_OPS(sub, -=, sub) + +/* atomic_and() */ ATOMIC_OP(and, &=, and) +#define ARCH_HAS_ATOMIC_OR +/* atomic_or() */ +ATOMIC_OP(or, |=, or) + #define atomic_clear_mask(mask, v) atomic_and(~(mask), (v)) #undef ATOMIC_OPS -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] atomic_or() related changes Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-09 10:20 +0200
[PATCH 3/3] ARC: provide atomic_or() and define ARCH_HAS_ATOMIC_OR Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-09 10:20 +0200
[PATCH 1/3] asm-generic/atomic.h: ARCH_HAS_ATOMIC_OR -> CONFIG_ARCH_HAS_ATOMIC_OR Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-09 10:20 +0200
Re: [PATCH 0/3] atomic_or() related changes Peter Zijlstra <peterz@infradead.org> - 2015-07-09 14:40 +0200
Re: [PATCH 0/3] atomic_or() related changes Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-09 15:10 +0200
csiph-web