summaryrefslogtreecommitdiff
path: root/arch/x86/machine
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
parent64830974a086e53ea1bc5e628e8955db83ff797a (diff)
Don't use reserved identifiers
Diffstat (limited to 'arch/x86/machine')
-rw-r--r--arch/x86/machine/atomic.h20
-rw-r--r--arch/x86/machine/cpu.h12
-rw-r--r--arch/x86/machine/ioapic.h6
3 files changed, 19 insertions, 19 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
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index 3025846..e1f8b8e 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 *
diff --git a/arch/x86/machine/ioapic.h b/arch/x86/machine/ioapic.h
index b9a702d..88999b9 100644
--- a/arch/x86/machine/ioapic.h
+++ b/arch/x86/machine/ioapic.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _KERN_IOAPIC_H
-#define _KERN_IOAPIC_H
+#ifndef KERN_IOAPIC_H
+#define KERN_IOAPIC_H
#include <stdbool.h>
#include <stdint.h>
@@ -38,4 +38,4 @@ void ioapic_register(unsigned int apic_id, uintptr_t addr,
void ioapic_override(uint8_t source, uint32_t gsi,
bool active_high, bool edge_triggered);
-#endif /* _KERN_IOAPIC_H */
+#endif /* KERN_IOAPIC_H */