summaryrefslogtreecommitdiff
path: root/arch/x86/machine/atomic.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-24 05:13:39 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-24 06:07:24 +0100
commitbe5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (patch)
tree3d8a70e30c8073e210c637fcca2185aa0f71f179 /arch/x86/machine/atomic.h
parent64830974a086e53ea1bc5e628e8955db83ff797a (diff)
Don't use reserved identifiers
Diffstat (limited to 'arch/x86/machine/atomic.h')
-rw-r--r--arch/x86/machine/atomic.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/machine/atomic.h b/arch/x86/machine/atomic.h
index de695b9..ce41358 100644
--- a/arch/x86/machine/atomic.h
+++ b/arch/x86/machine/atomic.h
@@ -22,7 +22,7 @@
#ifndef _X86_ATOMIC_H
#define _X86_ATOMIC_H
-#ifndef _KERN_ATOMIC_H
+#ifndef KERN_ATOMIC_H
#error "don't include <machine/atomic.h> directly, use <kern/atomic.h> instead"
#endif
@@ -48,11 +48,11 @@
*/
#define atomic_load_64(ptr, mo) \
MACRO_BEGIN \
- uint64_t ___ret = 0; \
+ uint64_t ret___ = 0; \
\
- __atomic_compare_exchange_n((uint64_t *)(ptr), &___ret, 0, \
+ __atomic_compare_exchange_n((uint64_t *)(ptr), &ret___, 0, \
false, mo, __ATOMIC_RELAXED); \
- ___ret; \
+ ret___; \
MACRO_END
#define atomic_load(ptr, mo) \
@@ -65,17 +65,17 @@ MACRO_BEGIN \
if (sizeof(*(ptr)) != 8) { \
__atomic_store_n(ptr, val, mo); \
} else { \
- typeof(*(ptr)) ___oval, ___nval; \
- bool ___done; \
+ typeof(*(ptr)) oval___, nval___; \
+ bool done___; \
\
- ___oval = *(ptr); \
- ___nval = (val); \
+ oval___ = *(ptr); \
+ nval___ = (val); \
\
do { \
- ___done = __atomic_compare_exchange_n(ptr, &___oval, ___nval, \
+ done___ = __atomic_compare_exchange_n(ptr, &oval___, nval___, \
false, mo, \
__ATOMIC_RELAXED); \
- } while (!___done); \
+ } while (!done___); \
\
} \
MACRO_END