[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1436429599-10762-4-git-send-email-vgupta@synopsys.com>
Date: Thu, 9 Jul 2015 13:43:19 +0530
From: Vineet Gupta <Vineet.Gupta1@...opsys.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>
CC: <linux-arch@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Vineet Gupta <Vineet.Gupta1@...opsys.com>
Subject: [PATCH 3/3] ARC: provide atomic_or() and define ARCH_HAS_ATOMIC_OR
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: linux-arch@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Vineet Gupta <vgupta@...opsys.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists