diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-24 05:13:39 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-24 06:07:24 +0100 |
commit | be5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (patch) | |
tree | 3d8a70e30c8073e210c637fcca2185aa0f71f179 | |
parent | 64830974a086e53ea1bc5e628e8955db83ff797a (diff) |
Don't use reserved identifiers
92 files changed, 387 insertions, 387 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 */ diff --git a/include/assert.h b/include/assert.h index 6aaf292..e77d68d 100644 --- a/include/assert.h +++ b/include/assert.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _ASSERT_H -#define _ASSERT_H +#ifndef ASSERT_H +#define ASSERT_H #define static_assert _Static_assert @@ -47,4 +47,4 @@ MACRO_END #endif /* NDEBUG */ -#endif /* _ASSERT_H */ +#endif /* ASSERT_H */ diff --git a/include/limits.h b/include/limits.h index 2d47e6b..4479885 100644 --- a/include/limits.h +++ b/include/limits.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LIMITS_H -#define _LIMITS_H +#ifndef LIMITS_H +#define LIMITS_H #define CHAR_BIT 8 @@ -26,4 +26,4 @@ #define LONG_BIT 32 #endif /* __LP64__ */ -#endif /* _LIMITS_H */ +#endif /* LIMITS_H */ diff --git a/include/stdio.h b/include/stdio.h index 96c0331..892603a 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _STDIO_H -#define _STDIO_H +#ifndef STDIO_H +#define STDIO_H #include <kern/fmt.h> #include <kern/printf.h> @@ -39,4 +39,4 @@ char console_getchar(void); #define sscanf fmt_sscanf #define vsscanf fmt_vsscanf -#endif /* _STDIO_H */ +#endif /* STDIO_H */ diff --git a/include/string.h b/include/string.h index 0eee896..d6a0d1e 100644 --- a/include/string.h +++ b/include/string.h @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _STRING_H -#define _STRING_H +#ifndef STRING_H +#define STRING_H #include <kern/string.h> -#endif /* _STRING_H */ +#endif /* STRING_H */ @@ -22,8 +22,8 @@ * or not), or "name=value". */ -#ifndef _KERN_ARG_H -#define _KERN_ARG_H +#ifndef KERN_ARG_H +#define KERN_ARG_H #include <stdbool.h> @@ -64,4 +64,4 @@ const char * arg_value(const char *name); */ INIT_OP_DECLARE(arg_setup); -#endif /* _KERN_ARG_H */ +#endif /* KERN_ARG_H */ diff --git a/kern/atomic.h b/kern/atomic.h index 940720a..e106dac 100644 --- a/kern/atomic.h +++ b/kern/atomic.h @@ -21,8 +21,8 @@ * C11 memory model terminology. */ -#ifndef _KERN_ATOMIC_H -#define _KERN_ATOMIC_H +#ifndef KERN_ATOMIC_H +#define KERN_ATOMIC_H #include <stdbool.h> @@ -91,13 +91,13 @@ */ #define atomic_cas(ptr, oval, nval, mo) \ MACRO_BEGIN \ - typeof(*(ptr)) ___oval, ___nval; \ + typeof(*(ptr)) oval___, nval___; \ \ - ___oval = (oval); \ - ___nval = (nval); \ - __atomic_compare_exchange_n(ptr, &___oval, ___nval, false, \ + oval___ = (oval); \ + nval___ = (nval); \ + __atomic_compare_exchange_n(ptr, &oval___, nval___, false, \ mo, ATOMIC_RELAXED); \ - ___oval; \ + oval___; \ MACRO_END /* @@ -147,4 +147,4 @@ MACRO_END #define atomic_fetch_sub_acq_rel(ptr, val) \ atomic_fetch_sub(ptr, val, ATOMIC_ACQ_REL) -#endif /* _KERN_ATOMIC_H */ +#endif /* KERN_ATOMIC_H */ diff --git a/kern/bitmap.h b/kern/bitmap.h index 9a3d7a0..6ca0eef 100644 --- a/kern/bitmap.h +++ b/kern/bitmap.h @@ -21,8 +21,8 @@ * is the responsibility of the caller. */ -#ifndef _KERN_BITMAP_H -#define _KERN_BITMAP_H +#ifndef KERN_BITMAP_H +#define KERN_BITMAP_H #include <limits.h> #include <string.h> @@ -193,4 +193,4 @@ for ((bit) = 0; \ && (((bit) = bitmap_find_next_zero(bm, nr_bits, bit)) != -1); \ (bit)++) -#endif /* _KERN_BITMAP_H */ +#endif /* KERN_BITMAP_H */ diff --git a/kern/bitmap_i.h b/kern/bitmap_i.h index dc91a0a..94d629a 100644 --- a/kern/bitmap_i.h +++ b/kern/bitmap_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_BITMAP_I_H -#define _KERN_BITMAP_I_H +#ifndef KERN_BITMAP_I_H +#define KERN_BITMAP_I_H #include <limits.h> @@ -54,4 +54,4 @@ bitmap_mask(int bit) int bitmap_find_next_bit(const unsigned long *bm, int nr_bits, int bit, int complement); -#endif /* _KERN_BITMAP_I_H */ +#endif /* KERN_BITMAP_I_H */ diff --git a/kern/cbuf.h b/kern/cbuf.h index a64121d..d82d261 100644 --- a/kern/cbuf.h +++ b/kern/cbuf.h @@ -18,8 +18,8 @@ * Circular byte buffer. */ -#ifndef _KERN_CBUF_H -#define _KERN_CBUF_H +#ifndef KERN_CBUF_H +#define KERN_CBUF_H #include <stdbool.h> #include <stddef.h> @@ -139,4 +139,4 @@ int cbuf_write(struct cbuf *cbuf, size_t index, const void *buf, size_t size); */ int cbuf_read(const struct cbuf *cbuf, size_t index, void *buf, size_t *sizep); -#endif /* _KERN_CBUF_H */ +#endif /* KERN_CBUF_H */ diff --git a/kern/clock.h b/kern/clock.h index 3b695d5..7beae9c 100644 --- a/kern/clock.h +++ b/kern/clock.h @@ -18,8 +18,8 @@ * Timekeeping module. */ -#ifndef _KERN_CLOCK_H -#define _KERN_CLOCK_H +#ifndef KERN_CLOCK_H +#define KERN_CLOCK_H #include <stdbool.h> #include <stdint.h> @@ -116,4 +116,4 @@ clock_time_occurred(uint64_t t, uint64_t ref) void clock_tick_intr(void); -#endif /* _KERN_CLOCK_H */ +#endif /* KERN_CLOCK_H */ diff --git a/kern/clock_i.h b/kern/clock_i.h index 8b98f5e..bf8d431 100644 --- a/kern/clock_i.h +++ b/kern/clock_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_CLOCK_I_H -#define _KERN_CLOCK_I_H +#ifndef KERN_CLOCK_I_H +#define KERN_CLOCK_I_H #include <stdalign.h> #include <stdint.h> @@ -40,4 +40,4 @@ union clock_global_time { #endif /* ATOMIC_HAVE_64B_OPS */ }; -#endif /* _KERN_CLOCK_I_H */ +#endif /* KERN_CLOCK_I_H */ diff --git a/kern/condition.h b/kern/condition.h index 2082bee..9c01545 100644 --- a/kern/condition.h +++ b/kern/condition.h @@ -24,8 +24,8 @@ * with a mutex. */ -#ifndef _KERN_CONDITION_H -#define _KERN_CONDITION_H +#ifndef KERN_CONDITION_H +#define KERN_CONDITION_H #include <stdint.h> @@ -65,4 +65,4 @@ int condition_timedwait(struct condition *condition, void condition_signal(struct condition *condition); void condition_broadcast(struct condition *condition); -#endif /* _KERN_CONDITION_H */ +#endif /* KERN_CONDITION_H */ diff --git a/kern/condition_types.h b/kern/condition_types.h index abd42f2..ddff2ae 100644 --- a/kern/condition_types.h +++ b/kern/condition_types.h @@ -18,11 +18,11 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_CONDITION_TYPES_H -#define _KERN_CONDITION_TYPES_H +#ifndef KERN_CONDITION_TYPES_H +#define KERN_CONDITION_TYPES_H struct condition { unsigned int _unused; }; -#endif /* _KERN_CONDITION_TYPES_H */ +#endif /* KERN_CONDITION_TYPES_H */ diff --git a/kern/console.h b/kern/console.h index 1578997..2c242d0 100644 --- a/kern/console.h +++ b/kern/console.h @@ -18,8 +18,8 @@ * Device-independent console interface. */ -#ifndef _KERN_CONSOLE_H -#define _KERN_CONSOLE_H +#ifndef KERN_CONSOLE_H +#define KERN_CONSOLE_H #include <kern/cbuf.h> #include <kern/init.h> @@ -104,4 +104,4 @@ INIT_OP_DECLARE(console_bootstrap); */ INIT_OP_DECLARE(console_setup); -#endif /* _KERN_CONSOLE_H */ +#endif /* KERN_CONSOLE_H */ diff --git a/kern/cpumap.h b/kern/cpumap.h index 89873b5..86d345d 100644 --- a/kern/cpumap.h +++ b/kern/cpumap.h @@ -23,8 +23,8 @@ * stack. */ -#ifndef _KERN_CPUMAP_H -#define _KERN_CPUMAP_H +#ifndef KERN_CPUMAP_H +#define KERN_CPUMAP_H #include <kern/bitmap.h> #include <kern/init.h> @@ -170,4 +170,4 @@ int cpumap_check(const struct cpumap *cpumap); */ INIT_OP_DECLARE(cpumap_setup); -#endif /* _KERN_CPUMAP_H */ +#endif /* KERN_CPUMAP_H */ diff --git a/kern/error.h b/kern/error.h index a77db97..5db1dba 100644 --- a/kern/error.h +++ b/kern/error.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_ERROR_H -#define _KERN_ERROR_H +#ifndef KERN_ERROR_H +#define KERN_ERROR_H #define ERROR_NOMEM 1 #define ERROR_AGAIN 2 @@ -40,4 +40,4 @@ const char * error_str(int error); */ void error_check(int error, const char *prefix); -#endif /* _KERN_ERROR_H */ +#endif /* KERN_ERROR_H */ @@ -38,8 +38,8 @@ * http://git.sceen.net/rbraun/librbraun.git/ */ -#ifndef _FMT_H -#define _FMT_H +#ifndef FMT_H +#define FMT_H #include <stdarg.h> #include <stddef.h> @@ -62,4 +62,4 @@ int fmt_sscanf(const char *str, const char *format, ...) int fmt_vsscanf(const char *str, const char *format, va_list ap) __attribute__((format(scanf, 2, 0))); -#endif /* _FMT_H */ +#endif /* FMT_H */ diff --git a/kern/hash.h b/kern/hash.h index 666f10d..182d92b 100644 --- a/kern/hash.h +++ b/kern/hash.h @@ -36,8 +36,8 @@ * HASH_ALLBITS macro. */ -#ifndef _KERN_HASH_H -#define _KERN_HASH_H +#ifndef KERN_HASH_H +#define KERN_HASH_H #include <assert.h> #include <stdint.h> @@ -113,4 +113,4 @@ hash_str(const char *str, unsigned int bits) return hash & ((1 << bits) - 1); } -#endif /* _KERN_HASH_H */ +#endif /* KERN_HASH_H */ diff --git a/kern/hlist.h b/kern/hlist.h index 83d64fe..8445888 100644 --- a/kern/hlist.h +++ b/kern/hlist.h @@ -18,8 +18,8 @@ * Doubly-linked list specialized for forward traversals and O(1) removals. */ -#ifndef _KERN_HLIST_H -#define _KERN_HLIST_H +#ifndef KERN_HLIST_H +#define KERN_HLIST_H #include <stdbool.h> #include <stddef.h> @@ -197,10 +197,10 @@ hlist_remove(struct hlist_node *node) */ #define hlist_first_entry(list, type, member) \ MACRO_BEGIN \ - struct hlist_node *___first; \ + struct hlist_node *first___; \ \ - ___first = (list)->first; \ - hlist_end(___first) ? NULL : hlist_entry(___first, type, member); \ + first___ = (list)->first; \ + hlist_end(first___) ? NULL : hlist_entry(first___, type, member); \ MACRO_END /* @@ -208,12 +208,12 @@ MACRO_END */ #define hlist_next_entry(entry, member) \ MACRO_BEGIN \ - struct hlist_node *___next; \ + struct hlist_node *next___; \ \ - ___next = (entry)->member.next; \ - hlist_end(___next) \ + next___ = (entry)->member.next; \ + hlist_end(next___) \ ? NULL \ - : hlist_entry(___next, typeof(*entry), member); \ + : hlist_entry(next___, typeof(*entry), member); \ MACRO_END /* @@ -352,10 +352,10 @@ hlist_rcu_remove(struct hlist_node *node) */ #define hlist_rcu_first_entry(list, type, member) \ MACRO_BEGIN \ - struct hlist_node *___first; \ + struct hlist_node *first___; \ \ - ___first = hlist_rcu_first(list); \ - hlist_end(___first) ? NULL : hlist_entry(___first, type, member); \ + first___ = hlist_rcu_first(list); \ + hlist_end(first___) ? NULL : hlist_entry(first___, type, member); \ MACRO_END /* @@ -363,12 +363,12 @@ MACRO_END */ #define hlist_rcu_next_entry(entry, member) \ MACRO_BEGIN \ - struct hlist_node *___next; \ + struct hlist_node *next___; \ \ - ___next = hlist_rcu_next(&entry->member); \ - hlist_end(___next) \ + next___ = hlist_rcu_next(&entry->member); \ + hlist_end(next___) \ ? NULL \ - : hlist_entry(___next, typeof(*entry), member); \ + : hlist_entry(next___, typeof(*entry), member); \ MACRO_END /* @@ -387,4 +387,4 @@ for (entry = hlist_rcu_first_entry(list, typeof(*entry), member); \ entry != NULL; \ entry = hlist_rcu_next_entry(entry, member)) -#endif /* _KERN_HLIST_H */ +#endif /* KERN_HLIST_H */ diff --git a/kern/hlist_types.h b/kern/hlist_types.h index f50b62d..facb01a 100644 --- a/kern/hlist_types.h +++ b/kern/hlist_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_HLIST_TYPES_H -#define _KERN_HLIST_TYPES_H +#ifndef KERN_HLIST_TYPES_H +#define KERN_HLIST_TYPES_H /* * List node. @@ -37,4 +37,4 @@ struct hlist { struct hlist_node *first; }; -#endif /* _KERN_HLIST_TYPES_H */ +#endif /* KERN_HLIST_TYPES_H */ diff --git a/kern/init.h b/kern/init.h index 7c3522e..11a0c80 100644 --- a/kern/init.h +++ b/kern/init.h @@ -18,8 +18,8 @@ * Init sections and operations. */ -#ifndef _KERN_INIT_H -#define _KERN_INIT_H +#ifndef KERN_INIT_H +#define KERN_INIT_H /* * These sections should contain code and data which can be discarded once @@ -110,4 +110,4 @@ void init_setup(void); #endif /* __ASSEMBLER__ */ -#endif /* _KERN_INIT_H */ +#endif /* KERN_INIT_H */ diff --git a/kern/init_i.h b/kern/init_i.h index ed59062..fb65f3a 100644 --- a/kern/init_i.h +++ b/kern/init_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_INIT_I_H -#define _KERN_INIT_I_H +#ifndef KERN_INIT_I_H +#define KERN_INIT_I_H #include <stdalign.h> #include <stdbool.h> @@ -54,4 +54,4 @@ struct init_op_dep { #define __INIT_OP(fn) fn ## _init_op #define INIT_OP(fn) __INIT_OP(fn) -#endif /* _KERN_INIT_I_H */ +#endif /* KERN_INIT_I_H */ diff --git a/kern/intr.h b/kern/intr.h index ac3f8cf..820f841 100644 --- a/kern/intr.h +++ b/kern/intr.h @@ -18,8 +18,8 @@ * Machine-independent interrupt management. */ -#ifndef _KERN_INTR_H -#define _KERN_INTR_H +#ifndef KERN_INTR_H +#define KERN_INTR_H #include <kern/init.h> @@ -76,4 +76,4 @@ INIT_OP_DECLARE(intr_bootstrap); */ INIT_OP_DECLARE(intr_setup); -#endif /* _KERN_INTR_H */ +#endif /* KERN_INTR_H */ diff --git a/kern/kernel.h b/kern/kernel.h index f14b95b..959f2a2 100644 --- a/kern/kernel.h +++ b/kern/kernel.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_KERNEL_H -#define _KERN_KERNEL_H +#ifndef KERN_KERNEL_H +#define KERN_KERNEL_H #include <stdnoreturn.h> @@ -40,4 +40,4 @@ noreturn void kernel_main(void); */ noreturn void kernel_ap_main(void); -#endif /* _KERN_KERNEL_H */ +#endif /* KERN_KERNEL_H */ diff --git a/kern/kmem.h b/kern/kmem.h index 3296ddb..3a3afb5 100644 --- a/kern/kmem.h +++ b/kern/kmem.h @@ -18,8 +18,8 @@ * Object caching and general purpose memory allocator. */ -#ifndef _KERN_KMEM_H -#define _KERN_KMEM_H +#ifndef KERN_KMEM_H +#define KERN_KMEM_H #include <stddef.h> @@ -112,4 +112,4 @@ INIT_OP_DECLARE(kmem_bootstrap); */ INIT_OP_DECLARE(kmem_setup); -#endif /* _KERN_KMEM_H */ +#endif /* KERN_KMEM_H */ diff --git a/kern/kmem_i.h b/kern/kmem_i.h index 0c0afd3..f170596 100644 --- a/kern/kmem_i.h +++ b/kern/kmem_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_KMEM_I_H -#define _KERN_KMEM_I_H +#ifndef KERN_KMEM_I_H +#define KERN_KMEM_I_H #include <stdalign.h> #include <stddef.h> @@ -197,4 +197,4 @@ struct kmem_cache { size_t redzone_pad; /* Bytes from end of object to redzone word */ }; -#endif /* _KERN_KMEM_I_H */ +#endif /* KERN_KMEM_I_H */ diff --git a/kern/list.h b/kern/list.h index 7ea3992..7b7e0f6 100644 --- a/kern/list.h +++ b/kern/list.h @@ -18,8 +18,8 @@ * Doubly-linked list. */ -#ifndef _KERN_LIST_H -#define _KERN_LIST_H +#ifndef KERN_LIST_H +#define KERN_LIST_H #include <stdbool.h> #include <stddef.h> @@ -477,14 +477,14 @@ list_rcu_remove(struct list *node) */ #define list_rcu_first_entry(list, type, member) \ MACRO_BEGIN \ - struct list *___list; \ - struct list *___first; \ + struct list *list___; \ + struct list *first___; \ \ - ___list = (list); \ - ___first = list_rcu_first(___list); \ - list_end(___list, ___first) \ + list___ = (list); \ + first___ = list_rcu_first(list___); \ + list_end(list___, first___) \ ? NULL \ - : list_entry(___first, type, member); \ + : list_entry(first___, type, member); \ MACRO_END /* @@ -519,4 +519,4 @@ for (entry = list_rcu_entry(list_first(list), \ entry = list_rcu_entry(list_next(&entry->member), \ typeof(*entry), member)) -#endif /* _KERN_LIST_H */ +#endif /* KERN_LIST_H */ diff --git a/kern/list_types.h b/kern/list_types.h index d6573cf..b76064a 100644 --- a/kern/list_types.h +++ b/kern/list_types.h @@ -18,12 +18,12 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_LIST_TYPES_H -#define _KERN_LIST_TYPES_H +#ifndef KERN_LIST_TYPES_H +#define KERN_LIST_TYPES_H struct list { struct list *prev; struct list *next; }; -#endif /* _KERN_LIST_TYPES_H */ +#endif /* KERN_LIST_TYPES_H */ @@ -18,8 +18,8 @@ * System logging. */ -#ifndef _KERN_LOG_H -#define _KERN_LOG_H +#ifndef KERN_LOG_H +#define KERN_LOG_H #include <stdarg.h> @@ -93,4 +93,4 @@ int log_vdebug(const char *format, va_list ap) */ INIT_OP_DECLARE(log_setup); -#endif /* _KERN_LOG_H */ +#endif /* KERN_LOG_H */ diff --git a/kern/macros.h b/kern/macros.h index 0411da2..08326db 100644 --- a/kern/macros.h +++ b/kern/macros.h @@ -23,8 +23,8 @@ * TODO Improve documentation. */ -#ifndef _KERN_MACROS_H -#define _KERN_MACROS_H +#ifndef KERN_MACROS_H +#define KERN_MACROS_H #if !defined(__GNUC__) || (__GNUC__ < 4) #error "GCC 4+ required" @@ -110,4 +110,4 @@ #endif /* __GNUC__ >= 7 */ #endif -#endif /* _KERN_MACROS_H */ +#endif /* KERN_MACROS_H */ diff --git a/kern/mutex.h b/kern/mutex.h index b4332de..c222c83 100644 --- a/kern/mutex.h +++ b/kern/mutex.h @@ -20,8 +20,8 @@ * Unlike spin locks, acquiring a mutex may make the calling thread sleep. */ -#ifndef _KERN_MUTEX_H -#define _KERN_MUTEX_H +#ifndef KERN_MUTEX_H +#define KERN_MUTEX_H #include <stdint.h> @@ -120,4 +120,4 @@ INIT_OP_DECLARE(mutex_bootstrap); */ INIT_OP_DECLARE(mutex_setup); -#endif /* _KERN_MUTEX_H */ +#endif /* KERN_MUTEX_H */ diff --git a/kern/mutex/mutex_adaptive_i.h b/kern/mutex/mutex_adaptive_i.h index 6ff1277..ce2ac4f 100644 --- a/kern/mutex/mutex_adaptive_i.h +++ b/kern/mutex/mutex_adaptive_i.h @@ -15,10 +15,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_MUTEX_ADAPTIVE_I_H -#define _KERN_MUTEX_ADAPTIVE_I_H +#ifndef KERN_MUTEX_ADAPTIVE_I_H +#define KERN_MUTEX_ADAPTIVE_I_H -#ifndef _KERN_MUTEX_H +#ifndef KERN_MUTEX_H #error "don't include <kern/mutex/mutex_adaptive_i.h> directly," \ " use <kern/mutex.h> instead" #endif @@ -143,4 +143,4 @@ INIT_OP_DECLARE(mutex_adaptive_bootstrap); #define mutex_impl_setup mutex_adaptive_setup INIT_OP_DECLARE(mutex_adaptive_setup); -#endif /* _KERN_MUTEX_ADAPTIVE_I_H */ +#endif /* KERN_MUTEX_ADAPTIVE_I_H */ diff --git a/kern/mutex/mutex_adaptive_types.h b/kern/mutex/mutex_adaptive_types.h index efbbf21..40270f6 100644 --- a/kern/mutex/mutex_adaptive_types.h +++ b/kern/mutex/mutex_adaptive_types.h @@ -18,10 +18,10 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_MUTEX_ADAPTIVE_TYPES_H -#define _KERN_MUTEX_ADAPTIVE_TYPES_H +#ifndef KERN_MUTEX_ADAPTIVE_TYPES_H +#define KERN_MUTEX_ADAPTIVE_TYPES_H -#ifndef _KERN_MUTEX_TYPES_H +#ifndef KERN_MUTEX_TYPES_H #error "don't include <kern/mutex/mutex_adaptive_types.h> directly," \ " use <kern/mutex_types.h> instead" #endif @@ -32,4 +32,4 @@ struct mutex { uintptr_t owner; }; -#endif /* _KERN_MUTEX_ADAPTIVE_TYPES_H */ +#endif /* KERN_MUTEX_ADAPTIVE_TYPES_H */ diff --git a/kern/mutex/mutex_pi_i.h b/kern/mutex/mutex_pi_i.h index 14f63be..f3bb28f 100644 --- a/kern/mutex/mutex_pi_i.h +++ b/kern/mutex/mutex_pi_i.h @@ -15,10 +15,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_MUTEX_PI_I_H -#define _KERN_MUTEX_PI_I_H +#ifndef KERN_MUTEX_PI_I_H +#define KERN_MUTEX_PI_I_H -#ifndef _KERN_MUTEX_H +#ifndef KERN_MUTEX_H #error "don't include <kern/mutex/mutex_pi_i.h> directly," \ " use <kern/mutex.h> instead" #endif @@ -72,4 +72,4 @@ mutex_impl_unlock(struct mutex *mutex) #define mutex_impl_bootstrap rtmutex_bootstrap #define mutex_impl_setup rtmutex_setup -#endif /* _KERN_MUTEX_PI_I_H */ +#endif /* KERN_MUTEX_PI_I_H */ diff --git a/kern/mutex/mutex_pi_types.h b/kern/mutex/mutex_pi_types.h index d9ebb6e..f511cbc 100644 --- a/kern/mutex/mutex_pi_types.h +++ b/kern/mutex/mutex_pi_types.h @@ -18,10 +18,10 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_MUTEX_PI_TYPES_H -#define _KERN_MUTEX_PI_TYPES_H +#ifndef KERN_MUTEX_PI_TYPES_H +#define KERN_MUTEX_PI_TYPES_H -#ifndef _KERN_MUTEX_TYPES_H +#ifndef KERN_MUTEX_TYPES_H #error "don't include <kern/mutex/mutex_pi_types.h> directly," \ " use <kern/mutex_types.h> instead" #endif @@ -36,4 +36,4 @@ struct mutex { struct rtmutex rtmutex; }; -#endif /* _KERN_MUTEX_PI_TYPES_H */ +#endif /* KERN_MUTEX_PI_TYPES_H */ diff --git a/kern/mutex/mutex_plain_i.h b/kern/mutex/mutex_plain_i.h index 74def89..0c58174 100644 --- a/kern/mutex/mutex_plain_i.h +++ b/kern/mutex/mutex_plain_i.h @@ -15,10 +15,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_MUTEX_PLAIN_I_H -#define _KERN_MUTEX_PLAIN_I_H +#ifndef KERN_MUTEX_PLAIN_I_H +#define KERN_MUTEX_PLAIN_I_H -#ifndef _KERN_MUTEX_H +#ifndef KERN_MUTEX_H #error "don't include <kern/mutex/mutex_plain_i.h> directly," \ " use <kern/mutex.h> instead" #endif @@ -137,4 +137,4 @@ INIT_OP_DECLARE(mutex_plain_bootstrap); #define mutex_impl_setup mutex_plain_setup INIT_OP_DECLARE(mutex_plain_setup); -#endif /* _KERN_MUTEX_PLAIN_I_H */ +#endif /* KERN_MUTEX_PLAIN_I_H */ diff --git a/kern/mutex/mutex_plain_types.h b/kern/mutex/mutex_plain_types.h index 02731e9..c666f66 100644 --- a/kern/mutex/mutex_plain_types.h +++ b/kern/mutex/mutex_plain_types.h @@ -18,10 +18,10 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_MUTEX_PLAIN_TYPES_H -#define _KERN_MUTEX_PLAIN_TYPES_H +#ifndef KERN_MUTEX_PLAIN_TYPES_H +#define KERN_MUTEX_PLAIN_TYPES_H -#ifndef _KERN_MUTEX_TYPES_H +#ifndef KERN_MUTEX_TYPES_H #error "don't include <kern/mutex/mutex_plain_types.h> directly," \ " use <kern/mutex_types.h> instead" #endif @@ -30,4 +30,4 @@ struct mutex { unsigned int state; }; -#endif /* _KERN_MUTEX_PLAIN_TYPES_H */ +#endif /* KERN_MUTEX_PLAIN_TYPES_H */ diff --git a/kern/mutex_types.h b/kern/mutex_types.h index 574f475..01b4c4d 100644 --- a/kern/mutex_types.h +++ b/kern/mutex_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_MUTEX_TYPES_H -#define _KERN_MUTEX_TYPES_H +#ifndef KERN_MUTEX_TYPES_H +#define KERN_MUTEX_TYPES_H #if defined(CONFIG_MUTEX_ADAPTIVE) #include <kern/mutex/mutex_adaptive_types.h> @@ -31,4 +31,4 @@ #error "unknown mutex implementation" #endif -#endif /* _KERN_MUTEX_TYPES_H */ +#endif /* KERN_MUTEX_TYPES_H */ diff --git a/kern/panic.h b/kern/panic.h index e6cbe8b..af858c7 100644 --- a/kern/panic.h +++ b/kern/panic.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_PANIC_H -#define _KERN_PANIC_H +#ifndef KERN_PANIC_H +#define KERN_PANIC_H #include <stdnoreturn.h> @@ -34,4 +34,4 @@ noreturn void panic(const char *format, ...) */ INIT_OP_DECLARE(panic_setup); -#endif /* _KERN_PANIC_H */ +#endif /* KERN_PANIC_H */ diff --git a/kern/percpu.h b/kern/percpu.h index e53f4e5..96f706e 100644 --- a/kern/percpu.h +++ b/kern/percpu.h @@ -50,8 +50,8 @@ * interrupt-safe. */ -#ifndef _KERN_PERCPU_H -#define _KERN_PERCPU_H +#ifndef KERN_PERCPU_H +#define KERN_PERCPU_H #include <assert.h> #include <stddef.h> @@ -121,4 +121,4 @@ INIT_OP_DECLARE(percpu_bootstrap); */ INIT_OP_DECLARE(percpu_setup); -#endif /* _KERN_PERCPU_H */ +#endif /* KERN_PERCPU_H */ diff --git a/kern/plist.h b/kern/plist.h index dd8fdd0..dd89629 100644 --- a/kern/plist.h +++ b/kern/plist.h @@ -23,8 +23,8 @@ * among the entries. */ -#ifndef _KERN_PLIST_H -#define _KERN_PLIST_H +#ifndef KERN_PLIST_H +#define KERN_PLIST_H #include <stdbool.h> @@ -267,4 +267,4 @@ for (pnode = plist_last(plist), tmp = plist_prev(pnode); \ #define plist_for_each_entry_reverse_safe(plist, entry, tmp, member) \ list_for_each_entry_reverse_safe(&(plist)->list, entry, tmp, member.node) -#endif /* _KERN_PLIST_H */ +#endif /* KERN_PLIST_H */ diff --git a/kern/plist_types.h b/kern/plist_types.h index 653d63f..aedb653 100644 --- a/kern/plist_types.h +++ b/kern/plist_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_PLIST_TYPES_H -#define _KERN_PLIST_TYPES_H +#ifndef KERN_PLIST_TYPES_H +#define KERN_PLIST_TYPES_H #include <kern/list_types.h> @@ -47,4 +47,4 @@ struct plist_node { struct list prio_node; }; -#endif /* _KERN_PLIST_TYPES_H */ +#endif /* KERN_PLIST_TYPES_H */ diff --git a/kern/printf.h b/kern/printf.h index 8185c73..eba5562 100644 --- a/kern/printf.h +++ b/kern/printf.h @@ -24,12 +24,12 @@ * See the sprintf module for information about the supported formats. */ -#ifndef _KERN_PRINTF_H -#define _KERN_PRINTF_H +#ifndef KERN_PRINTF_H +#define KERN_PRINTF_H -#ifndef _STDIO_H +#ifndef STDIO_H #error "do not use <kern/printf.h> directly; include <stdio.h> instead" -#endif /* _STDIO_H */ +#endif /* STDIO_H */ #include <stdarg.h> @@ -47,4 +47,4 @@ int vprintf(const char *format, va_list ap) */ INIT_OP_DECLARE(printf_setup); -#endif /* _KERN_PRINTF_H */ +#endif /* KERN_PRINTF_H */ diff --git a/kern/rbtree.h b/kern/rbtree.h index e805bd9..4299862 100644 --- a/kern/rbtree.h +++ b/kern/rbtree.h @@ -18,8 +18,8 @@ * Red-black tree. */ -#ifndef _KERN_RBTREE_H -#define _KERN_RBTREE_H +#ifndef KERN_RBTREE_H +#define KERN_RBTREE_H #include <assert.h> #include <stddef.h> @@ -117,22 +117,22 @@ rbtree_empty(const struct rbtree *tree) */ #define rbtree_lookup(tree, key, cmp_fn) \ MACRO_BEGIN \ - struct rbtree_node *___cur; \ - int ___diff; \ + struct rbtree_node *cur___; \ + int diff___; \ \ - ___cur = (tree)->root; \ + cur___ = (tree)->root; \ \ - while (___cur != NULL) { \ - ___diff = cmp_fn(key, ___cur); \ + while (cur___ != NULL) { \ + diff___ = cmp_fn(key, cur___); \ \ - if (___diff == 0) { \ + if (diff___ == 0) { \ break; \ } \ \ - ___cur = ___cur->children[rbtree_d2i(___diff)]; \ + cur___ = cur___->children[rbtree_d2i(diff___)]; \ } \ \ - ___cur; \ + cur___; \ MACRO_END /* @@ -147,30 +147,30 @@ MACRO_END */ #define rbtree_lookup_nearest(tree, key, cmp_fn, dir) \ MACRO_BEGIN \ - struct rbtree_node *___cur, *___prev; \ - int ___diff, ___index; \ + struct rbtree_node *cur___, *prev___; \ + int diff___, index___; \ \ - ___prev = NULL; \ - ___index = -1; \ - ___cur = (tree)->root; \ + prev___ = NULL; \ + index___ = -1; \ + cur___ = (tree)->root; \ \ - while (___cur != NULL) { \ - ___diff = cmp_fn(key, ___cur); \ + while (cur___ != NULL) { \ + diff___ = cmp_fn(key, cur___); \ \ - if (___diff == 0) { \ + if (diff___ == 0) { \ break; \ } \ \ - ___prev = ___cur; \ - ___index = rbtree_d2i(___diff); \ - ___cur = ___cur->children[___index]; \ + prev___ = cur___; \ + index___ = rbtree_d2i(diff___); \ + cur___ = cur___->children[index___]; \ } \ \ - if (___cur == NULL) { \ - ___cur = rbtree_nearest(___prev, ___index, dir); \ + if (cur___ == NULL) { \ + cur___ = rbtree_nearest(prev___, index___, dir); \ } \ \ - ___cur; \ + cur___; \ MACRO_END /* @@ -191,22 +191,22 @@ MACRO_END */ #define rbtree_insert(tree, node, cmp_fn) \ MACRO_BEGIN \ - struct rbtree_node *___cur, *___prev; \ - int ___diff, ___index; \ + struct rbtree_node *cur___, *prev___; \ + int diff___, index___; \ \ - ___prev = NULL; \ - ___index = -1; \ - ___cur = (tree)->root; \ + prev___ = NULL; \ + index___ = -1; \ + cur___ = (tree)->root; \ \ - while (___cur != NULL) { \ - ___diff = cmp_fn(node, ___cur); \ - assert(___diff != 0); \ - ___prev = ___cur; \ - ___index = rbtree_d2i(___diff); \ - ___cur = ___cur->children[___index]; \ + while (cur___ != NULL) { \ + diff___ = cmp_fn(node, cur___); \ + assert(diff___ != 0); \ + prev___ = cur___; \ + index___ = rbtree_d2i(diff___); \ + cur___ = cur___->children[index___]; \ } \ \ - rbtree_insert_rebalance(tree, ___prev, ___index, node); \ + rbtree_insert_rebalance(tree, prev___, index___, node); \ MACRO_END /* @@ -222,27 +222,27 @@ MACRO_END */ #define rbtree_lookup_slot(tree, key, cmp_fn, slot) \ MACRO_BEGIN \ - struct rbtree_node *___cur, *___prev; \ - int ___diff, ___index; \ + struct rbtree_node *cur___, *prev___; \ + int diff___, index___; \ \ - ___prev = NULL; \ - ___index = 0; \ - ___cur = (tree)->root; \ + prev___ = NULL; \ + index___ = 0; \ + cur___ = (tree)->root; \ \ - while (___cur != NULL) { \ - ___diff = cmp_fn(key, ___cur); \ + while (cur___ != NULL) { \ + diff___ = cmp_fn(key, cur___); \ \ - if (___diff == 0) { \ + if (diff___ == 0) { \ break; \ } \ \ - ___prev = ___cur; \ - ___index = rbtree_d2i(___diff); \ - ___cur = ___cur->children[___index]; \ + prev___ = cur___; \ + index___ = rbtree_d2i(diff___); \ + cur___ = cur___->children[index___]; \ } \ \ - (slot) = rbtree_slot(___prev, ___index); \ - ___cur; \ + (slot) = rbtree_slot(prev___, index___); \ + cur___; \ MACRO_END /* @@ -317,4 +317,4 @@ for (node = rbtree_postwalk_deepest(tree), \ node != NULL; \ node = tmp, tmp = rbtree_postwalk_unlink(node)) -#endif /* _KERN_RBTREE_H */ +#endif /* KERN_RBTREE_H */ diff --git a/kern/rbtree_i.h b/kern/rbtree_i.h index 973899b..8fad054 100644 --- a/kern/rbtree_i.h +++ b/kern/rbtree_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_RBTREE_I_H -#define _KERN_RBTREE_I_H +#ifndef KERN_RBTREE_I_H +#define KERN_RBTREE_I_H #include <assert.h> #include <stddef.h> @@ -186,4 +186,4 @@ struct rbtree_node * rbtree_postwalk_deepest(const struct rbtree *tree); */ struct rbtree_node * rbtree_postwalk_unlink(struct rbtree_node *node); -#endif /* _KERN_RBTREE_I_H */ +#endif /* KERN_RBTREE_I_H */ @@ -43,8 +43,8 @@ * [1] https://www.kernel.org/doc/Documentation/RCU/Design/Requirements/Requirements.html. */ -#ifndef _KERN_RCU_H -#define _KERN_RCU_H +#ifndef KERN_RCU_H +#define KERN_RCU_H #include <kern/atomic.h> #include <kern/init.h> @@ -142,4 +142,4 @@ void rcu_wait(void); */ INIT_OP_DECLARE(rcu_bootstrap); -#endif /* _KERN_RCU_H */ +#endif /* KERN_RCU_H */ diff --git a/kern/rcu_i.h b/kern/rcu_i.h index 6be933d..2606bf8 100644 --- a/kern/rcu_i.h +++ b/kern/rcu_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_RCU_I_H -#define _KERN_RCU_I_H +#ifndef KERN_RCU_I_H +#define KERN_RCU_I_H #include <assert.h> #include <stdbool.h> @@ -58,4 +58,4 @@ rcu_reader_dec(struct rcu_reader *reader) } } -#endif /* _KERN_RCU_I_H */ +#endif /* KERN_RCU_I_H */ diff --git a/kern/rcu_types.h b/kern/rcu_types.h index 12b8913..058d34f 100644 --- a/kern/rcu_types.h +++ b/kern/rcu_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_RCU_TYPES_H -#define _KERN_RCU_TYPES_H +#ifndef KERN_RCU_TYPES_H +#define KERN_RCU_TYPES_H #include <stdbool.h> @@ -37,4 +37,4 @@ struct rcu_reader { bool linked; }; -#endif /* _KERN_RCU_TYPES_H */ +#endif /* KERN_RCU_TYPES_H */ diff --git a/kern/rdxtree.h b/kern/rdxtree.h index f19f349..95b9ef9 100644 --- a/kern/rdxtree.h +++ b/kern/rdxtree.h @@ -22,8 +22,8 @@ * occur concurrently with updates using RCU. */ -#ifndef _KERN_RDXTREE_H -#define _KERN_RDXTREE_H +#ifndef KERN_RDXTREE_H +#define KERN_RDXTREE_H #include <stddef.h> #include <stdint.h> @@ -205,4 +205,4 @@ void rdxtree_remove_all(struct rdxtree *tree); */ INIT_OP_DECLARE(rdxtree_setup); -#endif /* _KERN_RDXTREE_H */ +#endif /* KERN_RDXTREE_H */ diff --git a/kern/rdxtree_i.h b/kern/rdxtree_i.h index 4dcf88e..e3583a4 100644 --- a/kern/rdxtree_i.h +++ b/kern/rdxtree_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_RDXTREE_I_H -#define _KERN_RDXTREE_I_H +#ifndef KERN_RDXTREE_I_H +#define KERN_RDXTREE_I_H /* * Radix tree. @@ -60,4 +60,4 @@ void * rdxtree_lookup_common(const struct rdxtree *tree, rdxtree_key_t key, void * rdxtree_walk(struct rdxtree *tree, struct rdxtree_iter *iter); -#endif /* _KERN_RDXTREE_I_H */ +#endif /* KERN_RDXTREE_I_H */ diff --git a/kern/rtmutex.h b/kern/rtmutex.h index 90b3438..396b2df 100644 --- a/kern/rtmutex.h +++ b/kern/rtmutex.h @@ -21,8 +21,8 @@ * inheritance is unconditionally enabled. */ -#ifndef _KERN_RTMUTEX_H -#define _KERN_RTMUTEX_H +#ifndef KERN_RTMUTEX_H +#define KERN_RTMUTEX_H #include <assert.h> #include <stdint.h> @@ -138,4 +138,4 @@ rtmutex_unlock(struct rtmutex *rtmutex) INIT_OP_DECLARE(rtmutex_bootstrap); INIT_OP_DECLARE(rtmutex_setup); -#endif /* _KERN_RTMUTEX_H */ +#endif /* KERN_RTMUTEX_H */ diff --git a/kern/rtmutex_i.h b/kern/rtmutex_i.h index 75ac5e4..9d3689d 100644 --- a/kern/rtmutex_i.h +++ b/kern/rtmutex_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_RTMUTEX_I_H -#define _KERN_RTMUTEX_I_H +#ifndef KERN_RTMUTEX_I_H +#define KERN_RTMUTEX_I_H #include <assert.h> #include <stdbool.h> @@ -78,4 +78,4 @@ int rtmutex_timedlock_slow(struct rtmutex *rtmutex, uint64_t ticks); void rtmutex_unlock_slow(struct rtmutex *rtmutex); -#endif /* _KERN_RTMUTEX_I_H */ +#endif /* KERN_RTMUTEX_I_H */ diff --git a/kern/rtmutex_types.h b/kern/rtmutex_types.h index c03e048..ba372a3 100644 --- a/kern/rtmutex_types.h +++ b/kern/rtmutex_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_RTMUTEX_TYPES_H -#define _KERN_RTMUTEX_TYPES_H +#ifndef KERN_RTMUTEX_TYPES_H +#define KERN_RTMUTEX_TYPES_H #include <stdint.h> @@ -27,4 +27,4 @@ struct rtmutex { uintptr_t owner; }; -#endif /* _KERN_RTMUTEX_TYPES_H */ +#endif /* KERN_RTMUTEX_TYPES_H */ diff --git a/kern/semaphore.h b/kern/semaphore.h index ee4c355..afe1646 100644 --- a/kern/semaphore.h +++ b/kern/semaphore.h @@ -41,8 +41,8 @@ * As a result, semaphores may only be used by application code. */ -#ifndef _KERN_SEMAPHORE_H -#define _KERN_SEMAPHORE_H +#ifndef KERN_SEMAPHORE_H +#define KERN_SEMAPHORE_H #include <assert.h> #include <stdint.h> @@ -155,4 +155,4 @@ semaphore_getvalue(const struct semaphore *semaphore) return atomic_load(&semaphore->value, ATOMIC_RELAXED); } -#endif /* _KERN_SEMAPHORE_H */ +#endif /* KERN_SEMAPHORE_H */ diff --git a/kern/semaphore_i.h b/kern/semaphore_i.h index 21f76cf..a4c50b8 100644 --- a/kern/semaphore_i.h +++ b/kern/semaphore_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_SEMAPHORE_I_H -#define _KERN_SEMAPHORE_I_H +#ifndef KERN_SEMAPHORE_I_H +#define KERN_SEMAPHORE_I_H #include <assert.h> #include <stdint.h> @@ -61,4 +61,4 @@ int semaphore_timedwait_slow(struct semaphore *semaphore, uint64_t ticks); void semaphore_post_slow(struct semaphore *semaphore); -#endif /* _KERN_SEMAPHORE_I_H */ +#endif /* KERN_SEMAPHORE_I_H */ diff --git a/kern/shell.h b/kern/shell.h index bdd02d9..3b1f1f3 100644 --- a/kern/shell.h +++ b/kern/shell.h @@ -18,8 +18,8 @@ * Minimalist shell for embedded systems. */ -#ifndef _KERN_SHELL_H -#define _KERN_SHELL_H +#ifndef KERN_SHELL_H +#define KERN_SHELL_H #include <kern/init.h> #include <kern/error.h> @@ -27,12 +27,12 @@ #define SHELL_REGISTER_CMDS(cmds) \ MACRO_BEGIN \ - size_t ___i; \ - int ___error; \ + size_t i___; \ + int error___; \ \ - for (___i = 0; ___i < ARRAY_SIZE(cmds); ___i++) { \ - ___error = shell_cmd_register(&(cmds)[___i]); \ - error_check(___error, __func__); \ + for (i___ = 0; i___ < ARRAY_SIZE(cmds); i___++) { \ + error___ = shell_cmd_register(&(cmds)[i___]); \ + error_check(error___, __func__); \ } \ MACRO_END @@ -86,4 +86,4 @@ int shell_cmd_register(struct shell_cmd *cmd); */ INIT_OP_DECLARE(shell_setup); -#endif /* _KERN_SHELL_H */ +#endif /* KERN_SHELL_H */ diff --git a/kern/shutdown.h b/kern/shutdown.h index f61079b..6f89e01 100644 --- a/kern/shutdown.h +++ b/kern/shutdown.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_SHUTDOWN_H -#define _KERN_SHUTDOWN_H +#ifndef KERN_SHUTDOWN_H +#define KERN_SHUTDOWN_H #include <stdnoreturn.h> @@ -46,4 +46,4 @@ INIT_OP_DECLARE(shutdown_bootstrap); */ INIT_OP_DECLARE(shutdown_setup); -#endif /* _KERN_SHUTDOWN_H */ +#endif /* KERN_SHUTDOWN_H */ diff --git a/kern/sleepq.h b/kern/sleepq.h index 213925c..45e3cfd 100644 --- a/kern/sleepq.h +++ b/kern/sleepq.h @@ -28,8 +28,8 @@ * allows preventing deadlocks while keeping overall complexity low. */ -#ifndef _KERN_SLEEPQ_H -#define _KERN_SLEEPQ_H +#ifndef KERN_SLEEPQ_H +#define KERN_SLEEPQ_H #include <stdbool.h> #include <stdint.h> @@ -137,4 +137,4 @@ void sleepq_broadcast(struct sleepq *sleepq); */ INIT_OP_DECLARE(sleepq_setup); -#endif /* _KERN_SLEEPQ_H */ +#endif /* KERN_SLEEPQ_H */ diff --git a/kern/slist.h b/kern/slist.h index d708f38..53b699d 100644 --- a/kern/slist.h +++ b/kern/slist.h @@ -18,8 +18,8 @@ * Singly-linked list. */ -#ifndef _KERN_SLIST_H -#define _KERN_SLIST_H +#ifndef KERN_SLIST_H +#define KERN_SLIST_H #include <stdbool.h> #include <stddef.h> @@ -223,10 +223,10 @@ slist_remove(struct slist *list, struct slist_node *prev) */ #define slist_first_entry(list, type, member) \ MACRO_BEGIN \ - struct slist_node *___first; \ + struct slist_node *first___; \ \ - ___first = (list)->first; \ - slist_end(___first) ? NULL : slist_entry(___first, type, member); \ + first___ = (list)->first; \ + slist_end(first___) ? NULL : slist_entry(first___, type, member); \ MACRO_END /* @@ -234,10 +234,10 @@ MACRO_END */ #define slist_last_entry(list, type, member) \ MACRO_BEGIN \ - struct slist_node *___last; \ + struct slist_node *last___; \ \ - ___last = (list)->last; \ - slist_end(___last) ? NULL : slist_entry(___last, type, member); \ + last___ = (list)->last; \ + slist_end(last___) ? NULL : slist_entry(last___, type, member); \ MACRO_END /* @@ -245,12 +245,12 @@ MACRO_END */ #define slist_next_entry(entry, member) \ MACRO_BEGIN \ - struct slist_node *___next; \ + struct slist_node *next___; \ \ - ___next = (entry)->member.next; \ - slist_end(___next) \ + next___ = (entry)->member.next; \ + slist_end(next___) \ ? NULL \ - : slist_entry(___next, typeof(*entry), member); \ + : slist_entry(next___, typeof(*entry), member); \ MACRO_END /* @@ -406,10 +406,10 @@ slist_rcu_remove(struct slist *list, struct slist_node *prev) */ #define slist_rcu_first_entry(list, type, member) \ MACRO_BEGIN \ - struct slist_node *___first; \ + struct slist_node *first___; \ \ - ___first = slist_rcu_first(list); \ - slist_end(___first) ? NULL : slist_entry(___first, type, member); \ + first___ = slist_rcu_first(list); \ + slist_end(first___) ? NULL : slist_entry(first___, type, member); \ MACRO_END /* @@ -417,12 +417,12 @@ MACRO_END */ #define slist_rcu_next_entry(entry, member) \ MACRO_BEGIN \ - struct slist_node *___next; \ + struct slist_node *next___; \ \ - ___next = slist_rcu_next(&entry->member); \ - slist_end(___next) \ + next___ = slist_rcu_next(&entry->member); \ + slist_end(next___) \ ? NULL \ - : slist_entry(___next, typeof(*entry), member); \ + : slist_entry(next___, typeof(*entry), member); \ MACRO_END /* @@ -441,4 +441,4 @@ for (entry = slist_rcu_first_entry(list, typeof(*entry), member); \ entry != NULL; \ entry = slist_rcu_next_entry(entry, member)) -#endif /* _KERN_SLIST_H */ +#endif /* KERN_SLIST_H */ diff --git a/kern/slist_types.h b/kern/slist_types.h index 78d7ffb..97121ec 100644 --- a/kern/slist_types.h +++ b/kern/slist_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_SLIST_TYPES_H -#define _KERN_SLIST_TYPES_H +#ifndef KERN_SLIST_TYPES_H +#define KERN_SLIST_TYPES_H #include <stdbool.h> #include <stddef.h> @@ -35,4 +35,4 @@ struct slist { struct slist_node *last; }; -#endif /* _KERN_SLIST_TYPES_H */ +#endif /* KERN_SLIST_TYPES_H */ diff --git a/kern/spinlock.h b/kern/spinlock.h index 30fc1e5..b90b553 100644 --- a/kern/spinlock.h +++ b/kern/spinlock.h @@ -23,8 +23,8 @@ * acquisition depending only on the number of contending processors. */ -#ifndef _KERN_SPINLOCK_H -#define _KERN_SPINLOCK_H +#ifndef KERN_SPINLOCK_H +#define KERN_SPINLOCK_H #include <kern/init.h> #include <kern/macros.h> @@ -181,4 +181,4 @@ spinlock_unlock_intr_restore(struct spinlock *lock, unsigned long flags) */ INIT_OP_DECLARE(spinlock_setup); -#endif /* _KERN_SPINLOCK_H */ +#endif /* KERN_SPINLOCK_H */ diff --git a/kern/spinlock_i.h b/kern/spinlock_i.h index a9f5fce..113b556 100644 --- a/kern/spinlock_i.h +++ b/kern/spinlock_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_SPINLOCK_I_H -#define _KERN_SPINLOCK_I_H +#ifndef KERN_SPINLOCK_I_H +#define KERN_SPINLOCK_I_H #include <assert.h> #include <stddef.h> @@ -122,4 +122,4 @@ spinlock_unlock_common(struct spinlock *lock) } } -#endif /* _KERN_SPINLOCK_I_H */ +#endif /* KERN_SPINLOCK_I_H */ diff --git a/kern/spinlock_types.h b/kern/spinlock_types.h index 93f85f7..89d7982 100644 --- a/kern/spinlock_types.h +++ b/kern/spinlock_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_SPINLOCK_TYPES_H -#define _KERN_SPINLOCK_TYPES_H +#ifndef KERN_SPINLOCK_TYPES_H +#define KERN_SPINLOCK_TYPES_H struct thread; @@ -31,4 +31,4 @@ struct spinlock { #endif /* CONFIG_SPINLOCK_DEBUG */ }; -#endif /* _KERN_SPINLOCK_TYPES_H */ +#endif /* KERN_SPINLOCK_TYPES_H */ diff --git a/kern/sref.h b/kern/sref.h index fb62d83..cb61b6e 100644 --- a/kern/sref.h +++ b/kern/sref.h @@ -28,8 +28,8 @@ * using sref counters in the work module itself. */ -#ifndef _KERN_SREF_H -#define _KERN_SREF_H +#ifndef KERN_SREF_H +#define KERN_SREF_H #include <kern/init.h> @@ -113,4 +113,4 @@ struct sref_counter * sref_weakref_get(struct sref_weakref *weakref); */ INIT_OP_DECLARE(sref_bootstrap); -#endif /* _KERN_SREF_H */ +#endif /* KERN_SREF_H */ diff --git a/kern/sref_i.h b/kern/sref_i.h index 65d0c1b..7b2b07f 100644 --- a/kern/sref_i.h +++ b/kern/sref_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_SREF_I_H -#define _KERN_SREF_I_H +#ifndef KERN_SREF_I_H +#define KERN_SREF_I_H #include <stdint.h> @@ -73,4 +73,4 @@ struct sref_counter { }; }; -#endif /* _KERN_SREF_I_H */ +#endif /* KERN_SREF_I_H */ diff --git a/kern/string.h b/kern/string.h index 7cd79a6..840ae11 100644 --- a/kern/string.h +++ b/kern/string.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_STRING_H -#define _KERN_STRING_H +#ifndef KERN_STRING_H +#define KERN_STRING_H #include <stddef.h> @@ -31,4 +31,4 @@ int strcmp(const char *s1, const char *s2); int strncmp(const char *s1, const char *s2, size_t n); char * strchr(const char *s, int c); -#endif /* _KERN_STRING_H */ +#endif /* KERN_STRING_H */ diff --git a/kern/syscnt.h b/kern/syscnt.h index fb00b75..167be09 100644 --- a/kern/syscnt.h +++ b/kern/syscnt.h @@ -21,8 +21,8 @@ * accessed and modified atomically from any context. */ -#ifndef _KERN_SYSCNT_H -#define _KERN_SYSCNT_H +#ifndef KERN_SYSCNT_H +#define KERN_SYSCNT_H #include <stdint.h> @@ -134,4 +134,4 @@ void syscnt_info(const char *prefix); */ INIT_OP_DECLARE(syscnt_setup); -#endif /* _KERN_SYSCNT_H */ +#endif /* KERN_SYSCNT_H */ diff --git a/kern/syscnt_types.h b/kern/syscnt_types.h index 81fb798..dc084eb 100644 --- a/kern/syscnt_types.h +++ b/kern/syscnt_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_SYSCNT_TYPES_H -#define _KERN_SYSCNT_TYPES_H +#ifndef KERN_SYSCNT_TYPES_H +#define KERN_SYSCNT_TYPES_H #include <stdint.h> @@ -41,4 +41,4 @@ struct syscnt { char name[SYSCNT_NAME_SIZE]; }; -#endif /* _KERN_SYSCNT_TYPES_H */ +#endif /* KERN_SYSCNT_TYPES_H */ diff --git a/kern/task.h b/kern/task.h index 4d9142c..5355c47 100644 --- a/kern/task.h +++ b/kern/task.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_TASK_H -#define _KERN_TASK_H +#ifndef KERN_TASK_H +#define KERN_TASK_H #include <kern/atomic.h> #include <kern/init.h> @@ -125,4 +125,4 @@ void task_info(struct task *task); */ INIT_OP_DECLARE(task_setup); -#endif /* _KERN_TASK_H */ +#endif /* KERN_TASK_H */ diff --git a/kern/thread.h b/kern/thread.h index f2cbfa0..97e1de7 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -30,8 +30,8 @@ * balancer thread of the second processor. */ -#ifndef _KERN_THREAD_H -#define _KERN_THREAD_H +#ifndef KERN_THREAD_H +#define KERN_THREAD_H #include <assert.h> #include <stdbool.h> @@ -730,4 +730,4 @@ INIT_OP_DECLARE(thread_bootstrap); */ INIT_OP_DECLARE(thread_setup); -#endif /* _KERN_THREAD_H */ +#endif /* KERN_THREAD_H */ diff --git a/kern/thread_i.h b/kern/thread_i.h index f46b956..0be1e77 100644 --- a/kern/thread_i.h +++ b/kern/thread_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_THREAD_I_H -#define _KERN_THREAD_I_H +#ifndef KERN_THREAD_I_H +#define KERN_THREAD_I_H #include <stdalign.h> #include <stdbool.h> @@ -213,4 +213,4 @@ thread_test_flag(struct thread *thread, unsigned long flag) return (atomic_load(&thread->flags, ATOMIC_ACQUIRE) & flag) != 0; } -#endif /* _KERN_THREAD_I_H */ +#endif /* KERN_THREAD_I_H */ diff --git a/kern/timer.h b/kern/timer.h index d47e5a7..43b7d90 100644 --- a/kern/timer.h +++ b/kern/timer.h @@ -18,8 +18,8 @@ * Low resolution timer system. */ -#ifndef _KERN_TIMER_H -#define _KERN_TIMER_H +#ifndef KERN_TIMER_H +#define KERN_TIMER_H #include <stdint.h> @@ -102,4 +102,4 @@ void timer_report_periodic_event(void); */ INIT_OP_DECLARE(timer_bootstrap); -#endif /* _KERN_TIMER_H */ +#endif /* KERN_TIMER_H */ diff --git a/kern/timer_i.h b/kern/timer_i.h index bbe07f9..799b5ac 100644 --- a/kern/timer_i.h +++ b/kern/timer_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_TIMER_I_H -#define _KERN_TIMER_I_H +#ifndef KERN_TIMER_I_H +#define KERN_TIMER_I_H #include <stdbool.h> #include <stdint.h> @@ -47,4 +47,4 @@ struct timer { struct thread *joiner; /* (c) */ }; -#endif /* _KERN_TIMER_I_H */ +#endif /* KERN_TIMER_I_H */ diff --git a/kern/turnstile.h b/kern/turnstile.h index e7b4a5e..8d427db 100644 --- a/kern/turnstile.h +++ b/kern/turnstile.h @@ -23,8 +23,8 @@ * unbounded priority inversion. */ -#ifndef _KERN_TURNSTILE_H -#define _KERN_TURNSTILE_H +#ifndef KERN_TURNSTILE_H +#define KERN_TURNSTILE_H #include <stdbool.h> #include <stddef.h> @@ -199,4 +199,4 @@ void turnstile_disown(struct turnstile *turnstile); */ INIT_OP_DECLARE(turnstile_setup); -#endif /* _KERN_TURNSTILE_H */ +#endif /* KERN_TURNSTILE_H */ diff --git a/kern/turnstile_types.h b/kern/turnstile_types.h index a95b691..1462356 100644 --- a/kern/turnstile_types.h +++ b/kern/turnstile_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _KERN_TURNSTILE_TYPES_H -#define _KERN_TURNSTILE_TYPES_H +#ifndef KERN_TURNSTILE_TYPES_H +#define KERN_TURNSTILE_TYPES_H #include <kern/plist_types.h> #include <kern/spinlock_types.h> @@ -55,4 +55,4 @@ struct turnstile_td { unsigned short top_priority; /* (t) */ }; -#endif /* _KERN_TURNSTILE_TYPES_H */ +#endif /* KERN_TURNSTILE_TYPES_H */ diff --git a/kern/types.h b/kern/types.h index 2eb1064..b03ef0c 100644 --- a/kern/types.h +++ b/kern/types.h @@ -18,9 +18,9 @@ * Machine-independent definitions for non-standard C types. */ -#ifndef _KERN_TYPES_H -#define _KERN_TYPES_H +#ifndef KERN_TYPES_H +#define KERN_TYPES_H typedef long ssize_t; -#endif /* _KERN_TYPES_H */ +#endif /* KERN_TYPES_H */ diff --git a/kern/work.h b/kern/work.h index ccd3c50..6053020 100644 --- a/kern/work.h +++ b/kern/work.h @@ -23,8 +23,8 @@ * concurrently handle queued works. */ -#ifndef _KERN_WORK_H -#define _KERN_WORK_H +#ifndef KERN_WORK_H +#define KERN_WORK_H #include <kern/init.h> @@ -155,4 +155,4 @@ void work_report_periodic_event(void); */ INIT_OP_DECLARE(work_bootstrap); -#endif /* _KERN_WORK_H */ +#endif /* KERN_WORK_H */ diff --git a/kern/work_i.h b/kern/work_i.h index b5bc872..2cc655b 100644 --- a/kern/work_i.h +++ b/kern/work_i.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _KERN_WORK_I_H -#define _KERN_WORK_I_H +#ifndef KERN_WORK_I_H +#define KERN_WORK_I_H struct work { struct work *next; @@ -29,4 +29,4 @@ struct work_queue { unsigned int nr_works; }; -#endif /* _KERN_WORK_I_H */ +#endif /* KERN_WORK_I_H */ diff --git a/kern/xcall.h b/kern/xcall.h index 4733152..666f24f 100644 --- a/kern/xcall.h +++ b/kern/xcall.h @@ -23,8 +23,8 @@ * TODO Asynchronous cross-calls. */ -#ifndef _KERN_XCALL_H -#define _KERN_XCALL_H +#ifndef KERN_XCALL_H +#define KERN_XCALL_H #include <kern/init.h> @@ -61,4 +61,4 @@ void xcall_intr(void); */ INIT_OP_DECLARE(xcall_setup); -#endif /* _KERN_XCALL_H */ +#endif /* KERN_XCALL_H */ diff --git a/test/test.h b/test/test.h index 4c2de92..d1417fd 100644 --- a/test/test.h +++ b/test/test.h @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _TEST_TEST_H -#define _TEST_TEST_H +#ifndef TEST_TEST_H +#define TEST_TEST_H void test_setup(void); -#endif /* _TEST_TEST_H */ +#endif /* TEST_TEST_H */ diff --git a/tools/tsort_init_ops.sh b/tools/tsort_init_ops.sh index a9c6e89..77b6aba 100755 --- a/tools/tsort_init_ops.sh +++ b/tools/tsort_init_ops.sh @@ -30,8 +30,8 @@ process() done } -# Define _KERN_INIT_H so that the INIT_XXX macros aren't expanded. -$compile -E -D_KERN_INIT_H "$@" \ +# Define KERN_INIT_H so that the INIT_XXX macros aren't expanded. +$compile -E -DKERN_INIT_H "$@" \ | sed -e 's/#.*$//' \ | tr '\n' ' ' \ | tr -s ' ' \ diff --git a/vm/vm_adv.h b/vm/vm_adv.h index 1138f0c..06f13e6 100644 --- a/vm/vm_adv.h +++ b/vm/vm_adv.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _VM_VM_ADV_H -#define _VM_VM_ADV_H +#ifndef VM_VM_ADV_H +#define VM_VM_ADV_H /* * Advice values. @@ -28,4 +28,4 @@ #define VM_ADV_DONTNEED 4 #define VM_ADV_DEFAULT VM_ADV_NORMAL -#endif /* _VM_VM_ADV_H */ +#endif /* VM_VM_ADV_H */ diff --git a/vm/vm_inherit.h b/vm/vm_inherit.h index 0ef4616..61690fd 100644 --- a/vm/vm_inherit.h +++ b/vm/vm_inherit.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _VM_VM_INHERIT_H -#define _VM_VM_INHERIT_H +#ifndef VM_VM_INHERIT_H +#define VM_VM_INHERIT_H /* * Inheritance values. @@ -26,4 +26,4 @@ #define VM_INHERIT_COPY 2 #define VM_INHERIT_DEFAULT VM_INHERIT_COPY -#endif /* _VM_VM_INHERIT_H */ +#endif /* VM_VM_INHERIT_H */ diff --git a/vm/vm_kmem.h b/vm/vm_kmem.h index 5ae4a16..e2e3581 100644 --- a/vm/vm_kmem.h +++ b/vm/vm_kmem.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _VM_VM_KMEM_H -#define _VM_VM_KMEM_H +#ifndef VM_VM_KMEM_H +#define VM_VM_KMEM_H #include <stdint.h> @@ -91,4 +91,4 @@ void vm_kmem_unmap_pa(uintptr_t map_va, size_t map_size); */ INIT_OP_DECLARE(vm_kmem_setup); -#endif /* _VM_VM_KMEM_H */ +#endif /* VM_VM_KMEM_H */ diff --git a/vm/vm_map.h b/vm/vm_map.h index 009c746..dc6514b 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -18,8 +18,8 @@ * Virtual memory map management. */ -#ifndef _VM_VM_MAP_H -#define _VM_VM_MAP_H +#ifndef VM_VM_MAP_H +#define VM_VM_MAP_H #include <stdint.h> @@ -135,4 +135,4 @@ INIT_OP_DECLARE(vm_map_bootstrap); */ INIT_OP_DECLARE(vm_map_setup); -#endif /* _VM_VM_MAP_H */ +#endif /* VM_VM_MAP_H */ diff --git a/vm/vm_object.h b/vm/vm_object.h index 2f0e8e1..f358313 100644 --- a/vm/vm_object.h +++ b/vm/vm_object.h @@ -21,8 +21,8 @@ * physical memory. They collectively form the page cache. */ -#ifndef _VM_OBJECT_H -#define _VM_OBJECT_H +#ifndef VM_OBJECT_H +#define VM_OBJECT_H #include <stdint.h> @@ -85,4 +85,4 @@ struct vm_page * vm_object_lookup(struct vm_object *object, uint64_t offset); */ INIT_OP_DECLARE(vm_object_setup); -#endif /* _VM_OBJECT_H */ +#endif /* VM_OBJECT_H */ diff --git a/vm/vm_object_types.h b/vm/vm_object_types.h index 4026002..80a19d9 100644 --- a/vm/vm_object_types.h +++ b/vm/vm_object_types.h @@ -18,8 +18,8 @@ * Isolated type definition used to avoid inclusion circular dependencies. */ -#ifndef _VM_OBJECT_TYPES_H -#define _VM_OBJECT_TYPES_H +#ifndef VM_OBJECT_TYPES_H +#define VM_OBJECT_TYPES_H #include <stdint.h> @@ -33,4 +33,4 @@ struct vm_object { unsigned long nr_pages; }; -#endif /* _VM_OBJECT_TYPES_H */ +#endif /* VM_OBJECT_TYPES_H */ diff --git a/vm/vm_page.h b/vm/vm_page.h index 9c8fa91..49daa09 100644 --- a/vm/vm_page.h +++ b/vm/vm_page.h @@ -21,8 +21,8 @@ * case there is at least one reference to it. */ -#ifndef _VM_VM_PAGE_H -#define _VM_VM_PAGE_H +#ifndef VM_VM_PAGE_H +#define VM_VM_PAGE_H #include <assert.h> #include <stdbool.h> @@ -283,4 +283,4 @@ vm_page_tryref(struct vm_page *page) */ INIT_OP_DECLARE(vm_page_setup); -#endif /* _VM_VM_PAGE_H */ +#endif /* VM_VM_PAGE_H */ diff --git a/vm/vm_prot.h b/vm/vm_prot.h index 27738c7..9c422f9 100644 --- a/vm/vm_prot.h +++ b/vm/vm_prot.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _VM_VM_PROT_H -#define _VM_VM_PROT_H +#ifndef VM_VM_PROT_H +#define VM_VM_PROT_H /* * Protection flags. @@ -28,4 +28,4 @@ #define VM_PROT_DEFAULT (VM_PROT_READ | VM_PROT_WRITE) #define VM_PROT_ALL (VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE) -#endif /* _VM_VM_PROT_H */ +#endif /* VM_VM_PROT_H */ |