Skip to contentSkip to conversation

define generic version of cmpxchg{64} only if not, previously defined

PATCH In review Pranith Kumar 3 participants 3 messages Jun 5, 2014 – Jun 11, 2014 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

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

define generic versions of cmpxchg{64} only if not previously defined.

This makes these definition in-line to other definitions of generic versions

---
 include/asm-generic/cmpxchg.h |    5 +++++
 1 file changed, 5 insertions(+)
include/asm-generic/cmpxchg.h +5 -0
index 811fb1e..7154b79 100644
@@ -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 */
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Pranith Kumar

define generic versions of cmpxchg{64} only if not previously defined.

This makes these definition in-line to other definitions of generic versions

I assume you have a patch that depends on this. Please queue up this first patch in the same series as the one that needs it.

Arnd

#2 lore raw
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · Pranith Kumar

define generic versions of cmpxchg{64} only if not previously defined.

Quoted 8 lines
Quoted 2 lines

This makes these definition in-line to other definitions of generic versions

I assume you have a patch that depends on this. Please queue up this first patch in the same series as the one that needs it.

This is just a clean up patch and there are no other patches depending on this. I will mark them as such from now on :)

--
Pranith