[PATCH 1/1] define generic version of cmpxchg{64} only if not, previously defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux