summaryrefslogtreecommitdiff
path: root/arch/x86/machine
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-04-14 22:03:50 +0200
committerRichard Braun <rbraun@sceen.net>2018-04-14 22:08:47 +0200
commitd4a39d61e853f570ec8d599e9500a80b035fb61f (patch)
tree5a5d7720c9e4d93a5f63beec9d7a0cedd1dcd62d /arch/x86/machine
parent4033816a7ce4a24230f462b5c22183c1b45e24df (diff)
Rename variables in function-like macros
Diffstat (limited to 'arch/x86/machine')
-rw-r--r--arch/x86/machine/atomic.h56
-rw-r--r--arch/x86/machine/cpu.h12
2 files changed, 34 insertions, 34 deletions
diff --git a/arch/x86/machine/atomic.h b/arch/x86/machine/atomic.h
index 344a029..36f0067 100644
--- a/arch/x86/machine/atomic.h
+++ b/arch/x86/machine/atomic.h
@@ -46,38 +46,38 @@
* Temporarily discard qualifiers when loading 64-bits values with a
* compare-and-swap operation.
*/
-#define atomic_load_64(ptr, mo) \
-MACRO_BEGIN \
- uint64_t ret___ = 0; \
- \
- __atomic_compare_exchange_n((uint64_t *)(ptr), &ret___, 0, \
- false, mo, __ATOMIC_RELAXED); \
- ret___; \
+#define atomic_load_64(ptr, mo) \
+MACRO_BEGIN \
+ uint64_t ret_ = 0; \
+ \
+ __atomic_compare_exchange_n((uint64_t *)(ptr), &ret_, 0, \
+ false, mo, __ATOMIC_RELAXED); \
+ ret_; \
MACRO_END
-#define atomic_load(ptr, mo) \
- (typeof(*(ptr)))__builtin_choose_expr(sizeof(*(ptr)) == 8, \
- atomic_load_64(ptr, mo), \
+#define atomic_load(ptr, mo) \
+ (typeof(*(ptr)))__builtin_choose_expr(sizeof(*(ptr)) == 8, \
+ atomic_load_64(ptr, mo), \
__atomic_load_n(ptr, mo))
-#define atomic_store(ptr, val, mo) \
-MACRO_BEGIN \
- if (sizeof(*(ptr)) != 8) { \
- __atomic_store_n(ptr, val, mo); \
- } else { \
- typeof(*(ptr)) oval___, nval___; \
- bool done___; \
- \
- oval___ = *(ptr); \
- nval___ = (val); \
- \
- do { \
- done___ = __atomic_compare_exchange_n(ptr, &oval___, nval___, \
- false, mo, \
- __ATOMIC_RELAXED); \
- } while (!done___); \
- \
- } \
+#define atomic_store(ptr, val, mo) \
+MACRO_BEGIN \
+ if (sizeof(*(ptr)) != 8) { \
+ __atomic_store_n(ptr, val, mo); \
+ } else { \
+ typeof(*(ptr)) oval_, nval_; \
+ bool done_; \
+ \
+ oval_ = *(ptr); \
+ nval_ = (val); \
+ \
+ do { \
+ done_ = __atomic_compare_exchange_n(ptr, &oval_, nval_, \
+ false, mo, \
+ __ATOMIC_RELAXED); \
+ } while (!done_); \
+ \
+ } \
MACRO_END
/*
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index 0023349..8f9b23c 100644
--- a/arch/x86/machine/cpu.h
+++ b/arch/x86/machine/cpu.h
@@ -435,13 +435,13 @@ extern void *cpu_local_area;
#define cpu_local_ptr(var) \
MACRO_BEGIN \
- typeof(var) *ptr___ = &(var); \
+ typeof(var) *ptr_ = &(var); \
\
asm("add %%fs:%1, %0" \
- : "+r" (ptr___) \
+ : "+r" (ptr_) \
: "m" (cpu_local_area)); \
\
- ptr___; \
+ ptr_; \
MACRO_END
#define cpu_local_var(var) (*cpu_local_ptr(var))
@@ -454,13 +454,13 @@ MACRO_END
#define cpu_local_read(var) \
MACRO_BEGIN \
- typeof(var) val___; \
+ typeof(var) val_; \
\
asm("mov %%fs:%1, %0" \
- : "=r" (val___) \
+ : "=r" (val_) \
: "m" (var)); \
\
- val___; \
+ val_; \
MACRO_END
static inline struct cpu *