From: Pranith Kumar <pranith@gatech.edu>
To: arnd@arndb.de
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] define generic version of cmpxchg{64} only if not, previously defined
Date: Thu, 05 Jun 2014 18:09:48 -0400 [thread overview]
Message-ID: <5390EAAC.5070601@gatech.edu> (raw)
define generic versions of cmpxchg{64} only if not previously defined.
This makes these definition in-line to other definitions of generic versions
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
include/asm-generic/cmpxchg.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h
index 811fb1e..7154b79 100644
--- a/include/asm-generic/cmpxchg.h
+++ b/include/asm-generic/cmpxchg.h
@@ -102,7 +102,12 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif
+#ifndef cmpxchg
#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
+#endif
+
+#ifndef cmpxchg64
#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
+#endif
#endif /* __ASM_GENERIC_CMPXCHG_H */
--
1.7.9.5
next reply other threads:[~2014-06-05 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 22:09 Pranith Kumar [this message]
2014-06-11 12:55 ` [PATCH 1/1] define generic version of cmpxchg{64} only if not, previously defined Arnd Bergmann
2014-06-11 16:07 ` Pranith Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5390EAAC.5070601@gatech.edu \
--to=pranith@gatech.edu \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.