Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
include
/
asm-generic
/
cmpxchg.h
diff --git
a/kernel/include/asm-generic/cmpxchg.h
b/kernel/include/asm-generic/cmpxchg.h
index
811fb1e
..
e5f9080
100644
(file)
--- a/
kernel/include/asm-generic/cmpxchg.h
+++ b/
kernel/include/asm-generic/cmpxchg.h
@@
-79,23
+79,23
@@
unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
}
}
}
}
-#define xchg(ptr, x) \
- ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
+#define xchg(ptr, x) ({ \
+ ((__typeof__(*(ptr))) \
+ __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \
+})
#endif /* xchg */
/*
* Atomic compare and exchange.
#endif /* xchg */
/*
* Atomic compare and exchange.
- *
- * Do not define __HAVE_ARCH_CMPXCHG because we want to use it to check whether
- * a cmpxchg primitive faster than repeated local irq save/restore exists.
*/
#include <asm-generic/cmpxchg-local.h>
#ifndef cmpxchg_local
*/
#include <asm-generic/cmpxchg-local.h>
#ifndef cmpxchg_local
-#define cmpxchg_local(ptr, o, n)
\
+#define cmpxchg_local(ptr, o, n)
({
\
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
- (unsigned long)(n), sizeof(*(ptr))))
+ (unsigned long)(n), sizeof(*(ptr)))); \
+})
#endif
#ifndef cmpxchg64_local
#endif
#ifndef cmpxchg64_local