From 512a0200deb092109101fdb8aa988e7af21027a8 Mon Sep 17 00:00:00 2001 From: Qian Ge Date: Fri, 20 Mar 2020 13:59:33 +1100 Subject: [PATCH] replacing all ifndef with pargma once All the kernel header files now use pargma once rather than the ifndef, as the pre-processed C files do not change while header files are protected with pargma once. This will also solve any naming issues caused by ifndef. --- include/32/mode/api/ipc_buffer.h | 5 ++--- include/32/mode/stdint.h | 5 +---- include/32/mode/util.h | 4 +--- include/64/mode/api/ipc_buffer.h | 5 +---- include/64/mode/stdint.h | 4 +--- include/64/mode/util.h | 4 +--- include/api.h | 5 +---- include/api/debug.h | 4 +--- include/api/failures.h | 4 +--- include/api/faults.h | 4 +--- include/api/syscall.h | 4 +--- include/api/types.h | 4 +--- include/arch/arm/arch/32/mode/fastpath/fastpath.h | 4 +--- include/arch/arm/arch/32/mode/hardware.h | 4 +--- include/arch/arm/arch/32/mode/kernel/stack.h | 4 +--- include/arch/arm/arch/32/mode/kernel/thread.h | 5 +---- include/arch/arm/arch/32/mode/kernel/vspace.h | 4 +--- include/arch/arm/arch/32/mode/machine.h | 5 +---- include/arch/arm/arch/32/mode/machine/debug.h | 4 +--- include/arch/arm/arch/32/mode/machine/fpu.h | 4 +--- include/arch/arm/arch/32/mode/machine/hardware.h | 4 +--- include/arch/arm/arch/32/mode/machine/registerset.h | 4 +--- include/arch/arm/arch/32/mode/machine/timer.h | 4 +--- include/arch/arm/arch/32/mode/machine_pl2.h | 4 +--- include/arch/arm/arch/32/mode/model/statedata.h | 4 +--- include/arch/arm/arch/32/mode/object/structures.h | 4 +--- include/arch/arm/arch/32/mode/smp/ipi.h | 5 ++--- include/arch/arm/arch/32/mode/smp/smp.h | 6 ++---- include/arch/arm/arch/32/mode/types.h | 4 +--- include/arch/arm/arch/64/mode/fastpath/fastpath.h | 4 +--- include/arch/arm/arch/64/mode/hardware.h | 5 ++--- include/arch/arm/arch/64/mode/kernel/stack.h | 5 ++--- include/arch/arm/arch/64/mode/kernel/thread.h | 4 +--- include/arch/arm/arch/64/mode/kernel/vspace.h | 6 ++---- include/arch/arm/arch/64/mode/machine.h | 5 ++--- include/arch/arm/arch/64/mode/machine/debug.h | 4 +--- include/arch/arm/arch/64/mode/machine/fpu.h | 4 +--- include/arch/arm/arch/64/mode/machine/hardware.h | 4 +--- include/arch/arm/arch/64/mode/machine/registerset.h | 4 +--- include/arch/arm/arch/64/mode/machine/timer.h | 5 ++--- include/arch/arm/arch/64/mode/machine_pl2.h | 4 +--- include/arch/arm/arch/64/mode/model/statedata.h | 4 +--- include/arch/arm/arch/64/mode/object/structures.h | 4 +--- include/arch/arm/arch/64/mode/smp/ipi.h | 4 +--- include/arch/arm/arch/64/mode/smp/smp.h | 4 +--- include/arch/arm/arch/64/mode/types.h | 5 ++--- include/arch/arm/arch/api/types.h | 5 ++--- include/arch/arm/arch/benchmark.h | 4 +--- include/arch/arm/arch/bootinfo.h | 5 ++--- include/arch/arm/arch/fastpath/fastpath.h | 4 +--- include/arch/arm/arch/kernel/boot.h | 4 +--- include/arch/arm/arch/kernel/thread.h | 4 +--- include/arch/arm/arch/kernel/traps.h | 4 +--- include/arch/arm/arch/kernel/vspace.h | 4 +--- include/arch/arm/arch/linker.h | 5 +---- include/arch/arm/arch/machine.h | 4 +--- include/arch/arm/arch/machine/capdl.h | 5 +---- include/arch/arm/arch/machine/debug.h | 4 +--- include/arch/arm/arch/machine/debug_conf.h | 4 +--- include/arch/arm/arch/machine/fpu.h | 6 ++---- include/arch/arm/arch/machine/gic_common.h | 4 +--- include/arch/arm/arch/machine/gic_v2.h | 5 +---- include/arch/arm/arch/machine/gic_v3.h | 4 +--- include/arch/arm/arch/machine/hardware.h | 4 +--- include/arch/arm/arch/machine/l2c_310.h | 4 +--- include/arch/arm/arch/machine/registerset.h | 4 +--- include/arch/arm/arch/machine/timer.h | 4 +--- include/arch/arm/arch/machine/tlb.h | 4 +--- include/arch/arm/arch/model/smp.h | 4 +--- include/arch/arm/arch/model/statedata.h | 4 +--- include/arch/arm/arch/object/interrupt.h | 4 +--- include/arch/arm/arch/object/iospace.h | 4 +--- include/arch/arm/arch/object/objecttype.h | 5 +---- include/arch/arm/arch/object/structures.h | 5 ++--- include/arch/arm/arch/object/vcpu.h | 4 +--- include/arch/arm/arch/smp/ipi.h | 5 ++--- include/arch/arm/arch/smp/ipi_inline.h | 5 ++--- include/arch/arm/arch/types.h | 4 +--- include/arch/arm/arch/user_access.h | 5 +---- include/arch/arm/armv/armv6/armv/benchmark.h | 4 +--- include/arch/arm/armv/armv6/armv/context_switch.h | 4 +--- include/arch/arm/armv/armv6/armv/debug.h | 4 +--- include/arch/arm/armv/armv6/armv/machine.h | 4 +--- include/arch/arm/armv/armv7-a/armv/benchmark.h | 5 ++--- include/arch/arm/armv/armv7-a/armv/context_switch.h | 4 +--- include/arch/arm/armv/armv7-a/armv/debug.h | 5 ++--- include/arch/arm/armv/armv7-a/armv/machine.h | 5 +---- include/arch/arm/armv/armv7-a/armv/vcpu.h | 5 +---- include/arch/arm/armv/armv8-a/64/armv/benchmark.h | 5 ++--- include/arch/arm/armv/armv8-a/64/armv/context_switch.h | 4 +--- include/arch/arm/armv/armv8-a/64/armv/debug.h | 5 +---- include/arch/arm/armv/armv8-a/64/armv/machine.h | 4 +--- include/arch/arm/armv/armv8-a/64/armv/tlb.h | 4 +--- include/arch/arm/armv/armv8-a/64/armv/vcpu.h | 4 +--- include/arch/riscv/arch/32/mode/hardware.h | 4 +--- include/arch/riscv/arch/32/mode/kernel/stack.h | 4 +--- include/arch/riscv/arch/32/mode/machine.h | 4 +--- include/arch/riscv/arch/32/mode/object/structures.h | 5 ++--- include/arch/riscv/arch/32/mode/types.h | 4 +--- include/arch/riscv/arch/64/mode/hardware.h | 4 +--- include/arch/riscv/arch/64/mode/kernel/stack.h | 5 ++--- include/arch/riscv/arch/64/mode/machine.h | 4 +--- include/arch/riscv/arch/64/mode/object/structures.h | 4 +--- include/arch/riscv/arch/64/mode/smp/ipi.h | 5 +---- include/arch/riscv/arch/64/mode/types.h | 5 ++--- include/arch/riscv/arch/api/types.h | 5 ++--- include/arch/riscv/arch/benchmark.h | 5 ++--- include/arch/riscv/arch/bootinfo.h | 5 +---- include/arch/riscv/arch/encoding.h | 10 ++++------ include/arch/riscv/arch/fastpath/fastpath.h | 5 ++--- include/arch/riscv/arch/kernel/boot.h | 5 ++--- include/arch/riscv/arch/kernel/thread.h | 4 +--- include/arch/riscv/arch/kernel/traps.h | 5 ++--- include/arch/riscv/arch/kernel/vspace.h | 4 +--- include/arch/riscv/arch/linker.h | 5 ++--- include/arch/riscv/arch/machine.h | 5 ++--- include/arch/riscv/arch/machine/capdl.h | 4 +--- include/arch/riscv/arch/machine/fpu.h | 4 +--- include/arch/riscv/arch/machine/hardware.h | 4 +--- include/arch/riscv/arch/machine/plic.h | 4 +--- include/arch/riscv/arch/machine/registerset.h | 4 +--- include/arch/riscv/arch/machine/timer.h | 5 +---- include/arch/riscv/arch/model/smp.h | 4 +--- include/arch/riscv/arch/model/statedata.h | 4 +--- include/arch/riscv/arch/object/interrupt.h | 4 +--- include/arch/riscv/arch/object/objecttype.h | 4 +--- include/arch/riscv/arch/object/structures.h | 5 ++--- include/arch/riscv/arch/sbi.h | 5 ++--- include/arch/riscv/arch/smp/ipi.h | 4 +--- include/arch/riscv/arch/smp/ipi_inline.h | 5 +---- include/arch/riscv/arch/types.h | 5 ++--- include/arch/x86/arch/32/mode/fastpath/fastpath.h | 5 ++--- include/arch/x86/arch/32/mode/hardware.h | 5 ++--- include/arch/x86/arch/32/mode/kernel/elf.h | 6 ++---- include/arch/x86/arch/32/mode/kernel/stack.h | 6 +++--- include/arch/x86/arch/32/mode/kernel/tlb.h | 4 +--- include/arch/x86/arch/32/mode/kernel/vspace.h | 5 ++--- include/arch/x86/arch/32/mode/machine.h | 4 +--- include/arch/x86/arch/32/mode/machine/cpu_registers.h | 5 ++--- include/arch/x86/arch/32/mode/machine/debug.h | 5 +---- include/arch/x86/arch/32/mode/machine/registerset.h | 6 +----- include/arch/x86/arch/32/mode/model/smp.h | 6 +----- include/arch/x86/arch/32/mode/model/statedata.h | 5 ++--- include/arch/x86/arch/32/mode/object/structures.h | 4 +--- include/arch/x86/arch/32/mode/smp/ipi.h | 6 ++---- include/arch/x86/arch/32/mode/stack.h | 4 +--- include/arch/x86/arch/32/mode/types.h | 4 +--- include/arch/x86/arch/64/mode/fastpath/fastpath.h | 4 +--- include/arch/x86/arch/64/mode/hardware.h | 4 +--- include/arch/x86/arch/64/mode/kernel/elf.h | 4 +--- include/arch/x86/arch/64/mode/kernel/stack.h | 4 +--- include/arch/x86/arch/64/mode/kernel/tlb.h | 4 +--- include/arch/x86/arch/64/mode/kernel/vspace.h | 4 +--- include/arch/x86/arch/64/mode/machine.h | 4 +--- include/arch/x86/arch/64/mode/machine/cpu_registers.h | 4 +--- include/arch/x86/arch/64/mode/machine/debug.h | 4 +--- include/arch/x86/arch/64/mode/machine/registerset.h | 4 +--- include/arch/x86/arch/64/mode/model/smp.h | 5 +---- include/arch/x86/arch/64/mode/model/statedata.h | 4 +--- include/arch/x86/arch/64/mode/object/structures.h | 4 +--- include/arch/x86/arch/64/mode/smp/ipi.h | 5 ++--- include/arch/x86/arch/64/mode/types.h | 4 +--- include/arch/x86/arch/api/types.h | 5 +---- include/arch/x86/arch/benchmark.h | 5 ++--- include/arch/x86/arch/bootinfo.h | 4 +--- include/arch/x86/arch/fastpath/fastpath.h | 5 +---- include/arch/x86/arch/kernel/apic.h | 5 ++--- include/arch/x86/arch/kernel/boot.h | 4 +--- include/arch/x86/arch/kernel/boot_sys.h | 4 +--- include/arch/x86/arch/kernel/cmdline.h | 6 +----- include/arch/x86/arch/kernel/elf.h | 4 +--- include/arch/x86/arch/kernel/ept.h | 4 +--- include/arch/x86/arch/kernel/multiboot.h | 5 +---- include/arch/x86/arch/kernel/multiboot2.h | 4 +--- include/arch/x86/arch/kernel/smp_sys.h | 5 +---- include/arch/x86/arch/kernel/thread.h | 5 ++--- include/arch/x86/arch/kernel/tlb.h | 5 ++--- include/arch/x86/arch/kernel/tlb_bitmap.h | 4 +--- include/arch/x86/arch/kernel/tlb_bitmap_defs.h | 5 ++--- include/arch/x86/arch/kernel/traps.h | 5 +---- include/arch/x86/arch/kernel/vspace.h | 4 +--- include/arch/x86/arch/kernel/x2apic.h | 4 +--- include/arch/x86/arch/kernel/xapic.h | 5 ++--- include/arch/x86/arch/linker.h | 4 +--- include/arch/x86/arch/machine.h | 4 +--- include/arch/x86/arch/machine/capdl.h | 4 +--- include/arch/x86/arch/machine/cpu_registers.h | 4 +--- include/arch/x86/arch/machine/debug.h | 5 +---- include/arch/x86/arch/machine/fpu.h | 5 ++--- include/arch/x86/arch/machine/hardware.h | 5 +---- include/arch/x86/arch/machine/pat.h | 4 +--- include/arch/x86/arch/machine/registerset.h | 4 +--- include/arch/x86/arch/machine/timer.h | 4 +--- include/arch/x86/arch/model/smp.h | 4 +--- include/arch/x86/arch/model/statedata.h | 4 +--- include/arch/x86/arch/object/interrupt.h | 4 +--- include/arch/x86/arch/object/ioport.h | 4 +--- include/arch/x86/arch/object/iospace.h | 4 +--- include/arch/x86/arch/object/objecttype.h | 4 +--- include/arch/x86/arch/object/structures.h | 5 +---- include/arch/x86/arch/object/tcb.h | 5 +---- include/arch/x86/arch/object/vcpu.h | 5 +---- include/arch/x86/arch/smp/ipi.h | 6 ++---- include/arch/x86/arch/smp/ipi_inline.h | 5 ++--- include/arch/x86/arch/types.h | 5 ++--- include/assert.h | 4 +--- include/basic_types.h | 5 +---- include/benchmark/benchmark.h | 4 +--- include/benchmark/benchmark_track.h | 4 +--- include/benchmark/benchmark_utilisation.h | 4 +--- include/benchmark/benchmark_utilisation_.h | 4 +--- include/bootinfo.h | 4 +--- include/compound_types.h | 4 +--- include/config.h | 4 +--- include/drivers/irq/am335x.h | 5 ++--- include/drivers/irq/bcm2836-armctrl-ic.h | 6 +++--- include/drivers/irq/hifive.h | 5 ++--- include/drivers/irq/imx31.h | 4 +--- include/drivers/irq/omap3.h | 4 +--- include/drivers/timer/allwinner.h | 4 +--- include/drivers/timer/am335x.h | 5 ++--- include/drivers/timer/arm_generic.h | 4 +--- include/drivers/timer/arm_global.h | 5 ++--- include/drivers/timer/arm_priv.h | 4 +--- include/drivers/timer/exynos4412-mct.h | 5 ++--- include/drivers/timer/imx31-epit.h | 5 ++--- include/drivers/timer/imx31-gpt.h | 4 +--- include/drivers/timer/mct.h | 4 +--- include/drivers/timer/omap3430.h | 4 +--- include/fastpath/fastpath.h | 4 +--- include/kernel/boot.h | 5 +---- include/kernel/cspace.h | 4 +--- include/kernel/faulthandler.h | 4 +--- include/kernel/sporadic.h | 4 +--- include/kernel/stack.h | 4 +--- include/kernel/thread.h | 4 +--- include/kernel/traps.h | 4 +--- include/kernel/vspace.h | 5 +---- include/linker.h | 5 ++--- include/machine.h | 4 +--- include/machine/assembler.h | 5 ++--- include/machine/capdl.h | 4 +--- include/machine/debug.h | 4 +--- include/machine/fpu.h | 5 ++--- include/machine/interrupt.h | 4 +--- include/machine/io.h | 5 +---- include/machine/profiler.h | 4 +--- include/machine/registerset.h | 4 +--- include/machine/timer.h | 5 ++--- include/model/preemption.h | 4 +--- include/model/smp.h | 4 +--- include/model/statedata.h | 4 +--- include/object.h | 4 +--- include/object/cap.h | 4 +--- include/object/cnode.h | 5 ++--- include/object/endpoint.h | 4 +--- include/object/interrupt.h | 4 +--- include/object/notification.h | 5 ++--- include/object/objecttype.h | 4 +--- include/object/reply.h | 4 +--- include/object/schedcontext.h | 5 +---- include/object/schedcontrol.h | 4 +--- include/object/structures.h | 4 +--- include/object/tcb.h | 4 +--- include/object/untyped.h | 4 +--- include/plat/default/plat/machine/hardware.h | 4 +--- include/plat/pc99/plat/32/plat_mode/machine/hardware.h | 4 +--- include/plat/pc99/plat/64/plat_mode/machine/hardware.h | 4 +--- include/plat/pc99/plat/machine.h | 4 +--- include/plat/pc99/plat/machine/acpi.h | 5 +---- include/plat/pc99/plat/machine/devices.h | 4 +--- include/plat/pc99/plat/machine/hardware.h | 5 ++--- include/plat/pc99/plat/machine/intel-vtd.h | 5 +---- include/plat/pc99/plat/machine/interrupt.h | 4 +--- include/plat/pc99/plat/machine/io.h | 4 +--- include/plat/pc99/plat/machine/ioapic.h | 5 ++--- include/plat/pc99/plat/machine/pci.h | 5 ++--- include/plat/pc99/plat/machine/pic.h | 4 +--- include/plat/pc99/plat/machine/pit.h | 4 +--- .../plat/spike/plat/instance/rocket-chip/hardware.h | 4 +--- include/plat/tk1/plat/machine/smmu.h | 4 +--- include/smp/ipi.h | 5 ++--- include/smp/lock.h | 5 ++--- include/stdarg.h | 4 +--- include/stdint.h | 4 +--- include/string.h | 4 +--- include/types.h | 4 +--- include/util.h | 5 ++--- libsel4/arch_include/arm/sel4/arch/constants.h | 4 +--- libsel4/arch_include/arm/sel4/arch/deprecated.h | 5 ++--- libsel4/arch_include/arm/sel4/arch/mapping.h | 5 ++--- libsel4/arch_include/arm/sel4/arch/objecttype.h | 4 +--- libsel4/arch_include/arm/sel4/arch/shared_types.h | 4 +--- libsel4/arch_include/arm/sel4/arch/simple_types.h | 4 +--- libsel4/arch_include/arm/sel4/arch/syscalls.h | 5 +---- libsel4/arch_include/arm/sel4/arch/types.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/bootinfo.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/constants.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/deprecated.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/exIPC.h | 5 +---- libsel4/arch_include/riscv/sel4/arch/mapping.h | 5 +---- libsel4/arch_include/riscv/sel4/arch/objecttype.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/pfIPC.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/shared_types.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/simple_types.h | 4 +--- libsel4/arch_include/riscv/sel4/arch/syscalls.h | 5 +---- libsel4/arch_include/riscv/sel4/arch/types.h | 5 +---- libsel4/arch_include/x86/sel4/arch/bootinfo_types.h | 4 +--- libsel4/arch_include/x86/sel4/arch/constants.h | 7 ++----- libsel4/arch_include/x86/sel4/arch/deprecated.h | 4 +--- libsel4/arch_include/x86/sel4/arch/mapping.h | 4 +--- libsel4/arch_include/x86/sel4/arch/objecttype.h | 4 +--- libsel4/arch_include/x86/sel4/arch/syscalls.h | 4 +--- libsel4/arch_include/x86/sel4/arch/types.h | 5 +---- libsel4/arch_include/x86/sel4/arch/vmenter.h | 4 +--- libsel4/include/sel4/assert.h | 5 +---- libsel4/include/sel4/benchmark_tracepoints_types.h | 4 +--- libsel4/include/sel4/benchmark_track_types.h | 4 +--- libsel4/include/sel4/benchmark_utilisation_types.h | 5 ++--- libsel4/include/sel4/bootinfo.h | 4 +--- libsel4/include/sel4/bootinfo_types.h | 4 +--- libsel4/include/sel4/constants.h | 5 ++--- libsel4/include/sel4/debug_assert.h | 4 +--- libsel4/include/sel4/deprecated.h | 4 +--- libsel4/include/sel4/errors.h | 5 +---- libsel4/include/sel4/functions.h | 5 ++--- libsel4/include/sel4/macros.h | 4 +--- libsel4/include/sel4/objecttype.h | 5 +---- libsel4/include/sel4/sel4.h | 6 ++---- libsel4/include/sel4/shared_types.h | 4 +--- libsel4/include/sel4/simple_types.h | 4 +--- libsel4/include/sel4/syscalls.h | 4 +--- libsel4/include/sel4/syscalls_master.h | 4 +--- libsel4/include/sel4/syscalls_mcs.h | 4 +--- libsel4/include/sel4/types.h | 4 +--- libsel4/mode_include/32/sel4/mode/types.h | 4 +--- libsel4/mode_include/64/sel4/mode/types.h | 5 +---- .../aarch32/sel4/sel4_arch/constants.h | 4 +--- .../aarch32/sel4/sel4_arch/deprecated.h | 4 +--- .../sel4_arch_include/aarch32/sel4/sel4_arch/mapping.h | 4 +--- .../aarch32/sel4/sel4_arch/objecttype.h | 5 +---- .../aarch32/sel4/sel4_arch/simple_types.h | 4 +--- .../aarch32/sel4/sel4_arch/syscalls.h | 5 +---- .../sel4_arch_include/aarch32/sel4/sel4_arch/types.h | 4 +--- .../sel4_arch_include/ia32/sel4/sel4_arch/constants.h | 5 +---- .../sel4_arch_include/ia32/sel4/sel4_arch/deprecated.h | 4 +--- .../sel4_arch_include/ia32/sel4/sel4_arch/mapping.h | 6 ++---- .../sel4_arch_include/ia32/sel4/sel4_arch/objecttype.h | 4 +--- .../ia32/sel4/sel4_arch/simple_types.h | 6 +----- .../sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h | 5 +---- libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h | 4 +--- .../riscv32/sel4/sel4_arch/constants.h | 5 +---- .../riscv32/sel4/sel4_arch/deprecated.h | 6 +----- .../sel4_arch_include/riscv32/sel4/sel4_arch/faults.h | 4 +--- .../sel4_arch_include/riscv32/sel4/sel4_arch/mapping.h | 5 +---- .../riscv32/sel4/sel4_arch/objecttype.h | 4 +--- .../riscv32/sel4/sel4_arch/simple_types.h | 6 +----- .../riscv32/sel4/sel4_arch/syscalls.h | 5 +---- .../sel4_arch_include/riscv32/sel4/sel4_arch/types.h | 5 +---- .../riscv64/sel4/sel4_arch/constants.h | 5 +---- .../riscv64/sel4/sel4_arch/deprecated.h | 5 +---- .../sel4_arch_include/riscv64/sel4/sel4_arch/faults.h | 4 +--- .../sel4_arch_include/riscv64/sel4/sel4_arch/mapping.h | 6 +----- .../riscv64/sel4/sel4_arch/objecttype.h | 4 +--- .../riscv64/sel4/sel4_arch/simple_types.h | 4 +--- .../riscv64/sel4/sel4_arch/syscalls.h | 5 +---- .../sel4_arch_include/riscv64/sel4/sel4_arch/types.h | 4 +--- .../x86_64/sel4/sel4_arch/constants.h | 4 +--- .../x86_64/sel4/sel4_arch/deprecated.h | 4 +--- .../sel4_arch_include/x86_64/sel4/sel4_arch/faults.h | 5 +---- .../sel4_arch_include/x86_64/sel4/sel4_arch/mapping.h | 6 ++---- .../x86_64/sel4/sel4_arch/objecttype.h | 4 +--- .../x86_64/sel4/sel4_arch/simple_types.h | 6 +----- .../sel4_arch_include/x86_64/sel4/sel4_arch/syscalls.h | 4 +--- .../x86_64/sel4/sel4_arch/syscalls_syscall.h | 5 +---- .../x86_64/sel4/sel4_arch/syscalls_sysenter.h | 4 +--- .../sel4_arch_include/x86_64/sel4/sel4_arch/types.h | 4 +--- .../allwinnerA20/sel4/plat/api/constants.h | 5 +---- .../sel4_plat_include/am335x/sel4/plat/api/constants.h | 4 +--- .../apq8064/sel4/plat/api/constants.h | 4 +--- .../sel4_plat_include/ariane/sel4/plat/api/constants.h | 5 +---- .../bcm2837/sel4/plat/api/constants.h | 5 +---- .../exynos4/sel4/plat/api/constants.h | 5 ++--- .../exynos5/sel4/plat/api/constants.h | 6 +----- .../exynos_common/sel4/plat/api/constants.h | 6 +----- .../sel4_plat_include/fvp/sel4/plat/api/constants.h | 5 +---- .../sel4_plat_include/hifive/sel4/plat/api/constants.h | 5 +---- .../sel4_plat_include/hikey/sel4/plat/api/constants.h | 5 ++--- .../sel4_plat_include/imx31/sel4/plat/api/constants.h | 5 ++--- .../sel4_plat_include/imx6/sel4/plat/api/constants.h | 5 ++--- .../imx8mq-evk/sel4/plat/api/constants.h | 4 +--- .../odroidc2/sel4/plat/api/constants.h | 5 ++--- .../sel4_plat_include/omap3/sel4/plat/api/constants.h | 4 +--- .../sel4_plat_include/pc99/sel4/plat/api/constants.h | 4 +--- .../qemu-arm-virt/sel4/plat/api/constants.h | 5 ++--- .../rocketchip/sel4/plat/api/constants.h | 4 +--- .../rockpro64/sel4/plat/api/constants.h | 5 ++--- .../sel4_plat_include/spike/sel4/plat/api/constants.h | 4 +--- .../sel4_plat_include/tk1/sel4/plat/api/constants.h | 5 +---- .../sel4_plat_include/tx1/sel4/plat/api/constants.h | 6 ++---- .../sel4_plat_include/tx2/sel4/plat/api/constants.h | 5 +---- .../zynq7000/sel4/plat/api/constants.h | 5 +---- .../sel4_plat_include/zynqmp/sel4/plat/api/constants.h | 5 +---- 403 files changed, 494 insertions(+), 1312 deletions(-) diff --git a/include/32/mode/api/ipc_buffer.h b/include/32/mode/api/ipc_buffer.h index 683111029..c4e6a9429 100644 --- a/include/32/mode/api/ipc_buffer.h +++ b/include/32/mode/api/ipc_buffer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __IPC_BUFFER_H -#define __IPC_BUFFER_H +#pragma once #include #include @@ -21,4 +20,4 @@ static inline word_t mode_setTimeArg(word_t i, time_t time, word_t *buffer, tcb_ setMR(thread, buffer, i, (uint32_t) time); return setMR(thread, buffer, i + 1, (uint32_t)(time >> 32llu)); } -#endif /* __IPC_BUFFER_H */ + diff --git a/include/32/mode/stdint.h b/include/32/mode/stdint.h index 062721123..5948d94c0 100644 --- a/include/32/mode/stdint.h +++ b/include/32/mode/stdint.h @@ -3,10 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __MODE_STDINT_H -#define __MODE_STDINT_H +#pragma once #define UINTPTR_MAX UINT32_MAX -#endif diff --git a/include/32/mode/util.h b/include/32/mode/util.h index ba10f548c..b38501480 100644 --- a/include/32/mode/util.h +++ b/include/32/mode/util.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_UTIL_H -#define __MODE_UTIL_H +#pragma once #include #include @@ -40,4 +39,3 @@ static inline CONST uint64_t div64(uint64_t numerator, uint32_t denominator) return quotient; } -#endif /* __MODE_UTIL_H */ diff --git a/include/64/mode/api/ipc_buffer.h b/include/64/mode/api/ipc_buffer.h index eac094374..12956a7a4 100644 --- a/include/64/mode/api/ipc_buffer.h +++ b/include/64/mode/api/ipc_buffer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __IPC_BUFFER_H -#define __IPC_BUFFER_H +#pragma once #include #include @@ -19,5 +18,3 @@ static inline word_t mode_setTimeArg(word_t i, time_t time, word_t *buffer, tcb_ { return setMR(thread, buffer, i, time); } - -#endif /* __IPC_BUFFER_H */ diff --git a/include/64/mode/stdint.h b/include/64/mode/stdint.h index 6e38b5329..c2613752f 100644 --- a/include/64/mode/stdint.h +++ b/include/64/mode/stdint.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_STDINT_H -#define __MODE_STDINT_H +#pragma once #define UINTPTR_MAX UINT64_MAX -#endif diff --git a/include/64/mode/util.h b/include/64/mode/util.h index 67446f2c6..c667e7997 100644 --- a/include/64/mode/util.h +++ b/include/64/mode/util.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_UTIL_H -#define __MODE_UTIL_H +#pragma once #include #include @@ -16,4 +15,3 @@ static inline CONST uint64_t div64(uint64_t numerator, uint32_t denominator) return numerator / denominator; } -#endif /* __MODE_UTIL_H */ diff --git a/include/api.h b/include/api.h index b310d5658..c134e7f2f 100644 --- a/include/api.h +++ b/include/api.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __API_H -#define __API_H +#pragma once #include #include #include - -#endif diff --git a/include/api/debug.h b/include/api/debug.h index f979817c9..de06f1de1 100644 --- a/include/api/debug.h +++ b/include/api/debug.h @@ -7,8 +7,7 @@ #include #ifdef CONFIG_DEBUG_BUILD -#ifndef __API_DEBUG_H -#define __API_DEBUG_H +#pragma once #include #include @@ -133,6 +132,5 @@ static inline void debug_dumpScheduler(void) } } #endif /* CONFIG_PRINTING */ -#endif /* __API_DEBUG_H */ #endif /* CONFIG_DEBUG_BUILD */ diff --git a/include/api/failures.h b/include/api/failures.h index 11339b5ec..7e9f0442f 100644 --- a/include/api/failures.h +++ b/include/api/failures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __FAILURES_H -#define __FAILURES_H +#pragma once #include #include @@ -40,4 +39,3 @@ extern lookup_fault_t current_lookup_fault; extern seL4_Fault_t current_fault; extern syscall_error_t current_syscall_error; -#endif diff --git a/include/api/faults.h b/include/api/faults.h index 3445969a7..d6412cf62 100644 --- a/include/api/faults.h +++ b/include/api/faults.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __API_FAULTS_H -#define __API_FAULTS_H +#pragma once #include #include @@ -16,4 +15,3 @@ word_t Arch_setMRs_fault(tcb_t *sender, tcb_t *receiver, word_t *receiveIPCBuffe bool_t handleFaultReply(tcb_t *receiver, tcb_t *sender); bool_t Arch_handleFaultReply(tcb_t *receiver, tcb_t *sender, word_t faultType); -#endif /* __API_FAULTS_H */ diff --git a/include/api/syscall.h b/include/api/syscall.h index 14c14e0ac..42cb8fb5e 100644 --- a/include/api/syscall.h +++ b/include/api/syscall.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __API_SYSCALL_H -#define __API_SYSCALL_H +#pragma once #include // for arch/api/syscall.h #include @@ -48,4 +47,3 @@ static inline word_t PURE getSyscallArg(word_t i, word_t *ipc_buffer) extern extra_caps_t current_extra_caps; -#endif diff --git a/include/api/types.h b/include/api/types.h index 583b0e8cb..6833eab2a 100644 --- a/include/api/types.h +++ b/include/api/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __API_TYPES_H -#define __API_TYPES_H +#pragma once #include #include @@ -130,4 +129,3 @@ static inline word_t CONST wordFromMessageInfo(seL4_MessageInfo_t mi) #define userError(...) #endif -#endif diff --git a/include/arch/arm/arch/32/mode/fastpath/fastpath.h b/include/arch/arm/arch/32/mode/fastpath/fastpath.h index ffea565c4..1ecb8a470 100644 --- a/include/arch/arm/arch/32/mode/fastpath/fastpath.h +++ b/include/arch/arm/arch/32/mode/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_32_H -#define __ARCH_FASTPATH_32_H +#pragma once #include #include @@ -172,4 +171,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m UNREACHABLE(); } -#endif /* __ARCH_FASTPATH_32_H */ diff --git a/include/arch/arm/arch/32/mode/hardware.h b/include/arch/arm/arch/32/mode/hardware.h index 53893f729..734c98d57 100644 --- a/include/arch/arm/arch/32/mode/hardware.h +++ b/include/arch/arm/arch/32/mode/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_HARDWARE_32_H -#define __ARCH_HARDWARE_32_H +#pragma once #include #ifndef __ASSEMBLER__ @@ -37,4 +36,3 @@ #include #endif -#endif /* __ARCH_HARDWARE_32_H */ diff --git a/include/arch/arm/arch/32/mode/kernel/stack.h b/include/arch/arm/arch/32/mode/kernel/stack.h index ee2a75f36..00a716f07 100644 --- a/include/arch/arm/arch/32/mode/kernel/stack.h +++ b/include/arch/arm/arch/32/mode/kernel/stack.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once #include #include #define KERNEL_STACK_ALIGNMENT 16 -#endif /* __KERNEL_MODE_STACK_H */ diff --git a/include/arch/arm/arch/32/mode/kernel/thread.h b/include/arch/arm/arch/32/mode/kernel/thread.h index 3ef3686d8..c975247c3 100644 --- a/include/arch/arm/arch/32/mode/kernel/thread.h +++ b/include/arch/arm/arch/32/mode/kernel/thread.h @@ -3,9 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __MODE_KERNEL_THREAD_H -#define __MODE_KERNEL_THREAD_H +#pragma once static inline word_t sanitiseRegister(register_t reg, word_t v, bool_t archInfo) { @@ -46,4 +44,3 @@ static inline bool_t PURE Arch_getSanitiseRegisterInfo(tcb_t *thread) } -#endif diff --git a/include/arch/arm/arch/32/mode/kernel/vspace.h b/include/arch/arm/arch/32/mode/kernel/vspace.h index f0720043e..3d5dd906e 100644 --- a/include/arch/arm/arch/32/mode/kernel/vspace.h +++ b/include/arch/arm/arch/32/mode/kernel/vspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_KERNEL_VSPACE_H -#define __ARCH_MODE_KERNEL_VSPACE_H +#pragma once #include #include @@ -71,4 +70,3 @@ static const region_t BOOT_RODATA mode_reserved_region[] = { }; #define MODE_RESERVED ARRAY_SIZE(mode_reserved_region) -#endif /* __ARCH_MODE_KERNEL_VSPACE_H */ diff --git a/include/arch/arm/arch/32/mode/machine.h b/include/arch/arm/arch/32/mode/machine.h index d55229bf6..5e808c377 100644 --- a/include/arch/arm/arch/32/mode/machine.h +++ b/include/arch/arm/arch/32/mode/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_32_H -#define __ARCH_MACHINE_32_H +#pragma once #include #include @@ -572,5 +571,3 @@ static inline void setACTLR(word_t actlr) void arch_clean_invalidate_caches(void); void arch_clean_invalidate_L1_caches(word_t type); - -#endif /* __ARCH_MACHINE_32_H */ diff --git a/include/arch/arm/arch/32/mode/machine/debug.h b/include/arch/arm/arch/32/mode/machine/debug.h index d483b1a39..ff5f7eba7 100644 --- a/include/arch/arm/arch/32/mode/machine/debug.h +++ b/include/arch/arm/arch/32/mode/machine/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_DEBUG_H_ -#define __ARCH_MODE_MACHINE_DEBUG_H_ +#pragma once #include @@ -193,4 +192,3 @@ static inline void unsetBreakpointUsedFlag(tcb_t *t, uint16_t bp_num) #endif /* !__ASSEMBLER__ */ #endif /* defined(CONFIG_DEBUG_BUILD) || defined (CONFIG_HARDWARE_DEBUG_API) */ -#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */ diff --git a/include/arch/arm/arch/32/mode/machine/fpu.h b/include/arch/arm/arch/32/mode/machine/fpu.h index 6e5e71438..0ef920542 100644 --- a/include/arch/arm/arch/32/mode/machine/fpu.h +++ b/include/arch/arm/arch/32/mode/machine/fpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_MACHINE_FPU_H -#define __MODE_MACHINE_FPU_H +#pragma once #include #include @@ -227,4 +226,3 @@ static inline void disableFpu(void) isFPUEnabledCached[SMP_TERNARY(getCurrentCPUIndex(), 0)] = false; } -#endif /* __MODE_MACHINE_FPU_H */ diff --git a/include/arch/arm/arch/32/mode/machine/hardware.h b/include/arch/arm/arch/32/mode/machine/hardware.h index 578c787ee..08a6e4d88 100644 --- a/include/arch/arm/arch/32/mode/machine/hardware.h +++ b/include/arch/arm/arch/32/mode/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_HARDWARE_32_H -#define __ARCH_MACHINE_HARDWARE_32_H +#pragma once #include #include @@ -135,4 +134,3 @@ static inline word_t CONST pageBitsForSize(vm_page_size_t pagesize) #endif /* __ASSEMBLER__ */ -#endif /* !__ARCH_MACHINE_HARDWARE_32_H */ diff --git a/include/arch/arm/arch/32/mode/machine/registerset.h b/include/arch/arm/arch/32/mode/machine/registerset.h index d636802d2..df49a3cc1 100644 --- a/include/arch/arm/arch/32/mode/machine/registerset.h +++ b/include/arch/arm/arch/32/mode/machine/registerset.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_REGISTERSET_32_H -#define __ARCH_MACHINE_REGISTERSET_32_H +#pragma once #include @@ -254,4 +253,3 @@ static inline void Arch_initContext(user_context_t *context) #endif /* !__ASSEMBLER__ */ -#endif /* !__ARCH_MACHINE_REGISTERSET_32_H */ diff --git a/include/arch/arm/arch/32/mode/machine/timer.h b/include/arch/arm/arch/32/mode/machine/timer.h index 44a929667..2f07afb4a 100644 --- a/include/arch/arm/arch/32/mode/machine/timer.h +++ b/include/arch/arm/arch/32/mode/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_TIMER_H_ -#define __ARCH_MODE_MACHINE_TIMER_H_ +#pragma once #include #include @@ -38,4 +37,3 @@ static inline CONST time_t ticksToUs(ticks_t ticks) } #endif /* CONFIG_KERNEL_MCS */ -#endif /* __ARCH_MODE_MACHINE_TIMER_H_ */ diff --git a/include/arch/arm/arch/32/mode/machine_pl2.h b/include/arch/arm/arch/32/mode/machine_pl2.h index c33aef51e..bb0aed3b9 100644 --- a/include/arch/arm/arch/32/mode/machine_pl2.h +++ b/include/arch/arm/arch/32/mode/machine_pl2.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_PL2_32_H -#define __ARCH_MACHINE_PL2_32_H +#pragma once #include #include @@ -211,4 +210,3 @@ static inline paddr_t addressTranslateS1CPR(vptr_t vaddr) } #endif /* !CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif /* __ARCH_MACHINE_PL2_32_H */ diff --git a/include/arch/arm/arch/32/mode/model/statedata.h b/include/arch/arm/arch/32/mode/model/statedata.h index 5a1828810..834367eb7 100644 --- a/include/arch/arm/arch/32/mode/model/statedata.h +++ b/include/arch/arm/arch/32/mode/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_32_H -#define __ARCH_MODEL_STATEDATA_32_H +#pragma once #include #include @@ -38,4 +37,3 @@ extern pde_t armUSGlobalPD[BIT(PD_INDEX_BITS)] VISIBLE; extern pte_t armUSGlobalPT[BIT(PT_INDEX_BITS)] VISIBLE; #endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif /* __ARCH_MODEL_STATEDATA_32_H */ diff --git a/include/arch/arm/arch/32/mode/object/structures.h b/include/arch/arm/arch/32/mode/object/structures.h index ab30a04ec..e471cc31c 100644 --- a/include/arch/arm/arch/32/mode/object/structures.h +++ b/include/arch/arm/arch/32/mode/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_32_H -#define __ARCH_OBJECT_STRUCTURES_32_H +#pragma once #include #include @@ -423,4 +422,3 @@ static inline word_t PURE pte_ptr_get_pteType(pte_t *pte_ptr) } #endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif /* __ARCH_OBJECT_STRUCTURES_32_H */ diff --git a/include/arch/arm/arch/32/mode/smp/ipi.h b/include/arch/arm/arch/32/mode/smp/ipi.h index bae61956b..fbb310715 100644 --- a/include/arch/arm/arch/32/mode/smp/ipi.h +++ b/include/arch/arm/arch/32/mode/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_IPI_H -#define __MODE_SMP_IPI_H +#pragma once #include #include @@ -20,4 +19,4 @@ typedef enum { } IpiModeRemoteCall_t; #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODE_SMP_IPI_H */ + diff --git a/include/arch/arm/arch/32/mode/smp/smp.h b/include/arch/arm/arch/32/mode/smp/smp.h index 1b2432432..b93e8f1f6 100644 --- a/include/arch/arm/arch/32/mode/smp/smp.h +++ b/include/arch/arm/arch/32/mode/smp/smp.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_H_ -#define __MODE_SMP_H_ - +#pragma once #include #ifdef ENABLE_SMP_SUPPORT @@ -36,4 +34,4 @@ static inline CONST cpu_id_t getCurrentCPUIndex(void) } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODE_SMP_H_ */ + diff --git a/include/arch/arm/arch/32/mode/types.h b/include/arch/arm/arch/32/mode/types.h index 58d3351ca..f6cc464b4 100644 --- a/include/arch/arm/arch/32/mode/types.h +++ b/include/arch/arm/arch/32/mode/types.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H_ -#define __ARCH_MODE_TYPES_H_ +#pragma once #define wordRadix 5 #define wordBits (1 << wordRadix) typedef uint32_t timestamp_t; -#endif /* __ARCH_MODE_TYPES_H_ */ diff --git a/include/arch/arm/arch/64/mode/fastpath/fastpath.h b/include/arch/arm/arch/64/mode/fastpath/fastpath.h index e1c93042f..4fc96f7b0 100644 --- a/include/arch/arm/arch/64/mode/fastpath/fastpath.h +++ b/include/arch/arm/arch/64/mode/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_64_H -#define __ARCH_FASTPATH_64_H +#pragma once #include #include @@ -152,4 +151,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m UNREACHABLE(); } -#endif /* __ARCH_FASTPATH_64_H */ diff --git a/include/arch/arm/arch/64/mode/hardware.h b/include/arch/arm/arch/64/mode/hardware.h index 8418f7e80..8d871ec18 100644 --- a/include/arch/arm/arch/64/mode/hardware.h +++ b/include/arch/arm/arch/64/mode/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_HARDWARE_H -#define __ARCH_MODE_HARDWARE_H +#pragma once #include #include @@ -80,4 +79,4 @@ #define PADDR_TOP (PPTR_TOP - BASE_OFFSET) -#endif /* __ARCH_MODE_HARDWARE_H */ + diff --git a/include/arch/arm/arch/64/mode/kernel/stack.h b/include/arch/arm/arch/64/mode/kernel/stack.h index 4bf346aee..59dc959c4 100644 --- a/include/arch/arm/arch/64/mode/kernel/stack.h +++ b/include/arch/arm/arch/64/mode/kernel/stack.h @@ -4,12 +4,11 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once #include #include #define KERNEL_STACK_ALIGNMENT 4096 -#endif /* __KERNEL_MODE_STACK_H */ + diff --git a/include/arch/arm/arch/64/mode/kernel/thread.h b/include/arch/arm/arch/64/mode/kernel/thread.h index 6e6baadef..18d072339 100644 --- a/include/arch/arm/arch/64/mode/kernel/thread.h +++ b/include/arch/arm/arch/64/mode/kernel/thread.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_KERNEL_THREAD_H -#define __MODE_KERNEL_THREAD_H +#pragma once static inline word_t CONST sanitiseRegister(register_t reg, word_t v, bool_t archInfo) { @@ -35,4 +34,3 @@ static inline bool_t CONST Arch_getSanitiseRegisterInfo(tcb_t *thread) #endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */ } -#endif diff --git a/include/arch/arm/arch/64/mode/kernel/vspace.h b/include/arch/arm/arch/64/mode/kernel/vspace.h index 99f729681..14d431277 100644 --- a/include/arch/arm/arch/64/mode/kernel/vspace.h +++ b/include/arch/arm/arch/64/mode/kernel/vspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_KERNEL_VSPACE_H_ -#define __ARCH_MODE_KERNEL_VSPACE_H_ +#pragma once #include #include @@ -89,5 +88,4 @@ static inline exception_t performASIDPoolInvocation(asid_t asid, asid_pool_t *po return EXCEPTION_NONE; } -#endif -#endif /* __ARCH_MODE_KERNEL_VSPACE_H_ */ +#endif \ No newline at end of file diff --git a/include/arch/arm/arch/64/mode/machine.h b/include/arch/arm/arch/64/mode/machine.h index 51db33dd0..62e8a0bde 100644 --- a/include/arch/arm/arch/64/mode/machine.h +++ b/include/arch/arm/arch/64/mode/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_H -#define __ARCH_MODE_MACHINE_H +#pragma once #include #include @@ -371,4 +370,4 @@ static inline word_t ats2e0r(word_t va) void arch_clean_invalidate_caches(void); void arch_clean_invalidate_L1_caches(word_t type); -#endif /* __ARCH_MODE_MACHINE_H */ + diff --git a/include/arch/arm/arch/64/mode/machine/debug.h b/include/arch/arm/arch/64/mode/machine/debug.h index 1ff88427c..1a2b4b6dc 100644 --- a/include/arch/arm/arch/64/mode/machine/debug.h +++ b/include/arch/arm/arch/64/mode/machine/debug.h @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_DEBUG_H_ -#define __ARCH_MODE_MACHINE_DEBUG_H_ +#pragma once -#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */ diff --git a/include/arch/arm/arch/64/mode/machine/fpu.h b/include/arch/arm/arch/64/mode/machine/fpu.h index cf970c5d9..a396b9f0e 100644 --- a/include/arch/arm/arch/64/mode/machine/fpu.h +++ b/include/arch/arm/arch/64/mode/machine/fpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_MACHINE_FPU_H -#define __MODE_MACHINE_FPU_H +#pragma once #include @@ -148,4 +147,3 @@ static inline void disableFpu(void) isFPUEnabledCached[SMP_TERNARY(getCurrentCPUIndex(), 0)] = false; } -#endif /* __MODE_MACHINE_FPU_H */ diff --git a/include/arch/arm/arch/64/mode/machine/hardware.h b/include/arch/arm/arch/64/mode/machine/hardware.h index e6559b3ea..f9533fbaa 100644 --- a/include/arch/arm/arch/64/mode/machine/hardware.h +++ b/include/arch/arm/arch/64/mode/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_HARDWARE_64_H -#define __ARCH_MACHINE_HARDWARE_64_H +#pragma once #include #include @@ -58,4 +57,3 @@ static inline word_t CONST pageBitsForSize(vm_page_size_t pagesize) #endif /* __ASSEMBLER__ */ -#endif /* __ARCH_MACHINE_HARDWARE_64_H */ diff --git a/include/arch/arm/arch/64/mode/machine/registerset.h b/include/arch/arm/arch/64/mode/machine/registerset.h index ed44e140b..ca0407706 100644 --- a/include/arch/arm/arch/64/mode/machine/registerset.h +++ b/include/arch/arm/arch/64/mode/machine/registerset.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_REGISTERSET_64_H -#define __ARCH_MACHINE_REGISTERSET_64_H +#pragma once #include @@ -268,4 +267,3 @@ static inline void Arch_initContext(user_context_t *context) #endif /* !__ASSEMBLER__ */ -#endif /* __ARCH_MACHINE_REGISTERSET_64_H */ diff --git a/include/arch/arm/arch/64/mode/machine/timer.h b/include/arch/arm/arch/64/mode/machine/timer.h index 2b17ed101..31d1aa2aa 100644 --- a/include/arch/arm/arch/64/mode/machine/timer.h +++ b/include/arch/arm/arch/64/mode/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_TIMER_H_ -#define __ARCH_MODE_MACHINE_TIMER_H_ +#pragma once #include #ifdef CONFIG_KERNEL_MCS @@ -31,4 +30,4 @@ static inline CONST time_t ticksToUs(ticks_t ticks) #endif } #endif /* CONFIG_KERNEL_MCS */ -#endif /* __ARCH_MODE_MACHINE_TIMER_H_ */ + diff --git a/include/arch/arm/arch/64/mode/machine_pl2.h b/include/arch/arm/arch/64/mode/machine_pl2.h index 936255e57..b6c853788 100644 --- a/include/arch/arm/arch/64/mode/machine_pl2.h +++ b/include/arch/arm/arch/64/mode/machine_pl2.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_PL2_H -#define __ARCH_MODE_MACHINE_PL2_H +#pragma once #ifdef CONFIG_ARM_HYPERVISOR_SUPPORT @@ -41,4 +40,3 @@ static inline paddr_t addressTranslateS1CPR(vptr_t vaddr) return vaddr; } -#endif /* __ARCH_MODE_MACHINE_H */ diff --git a/include/arch/arm/arch/64/mode/model/statedata.h b/include/arch/arm/arch/64/mode/model/statedata.h index 958acb223..132359091 100644 --- a/include/arch/arm/arch/64/mode/model/statedata.h +++ b/include/arch/arm/arch/64/mode/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_64_H -#define __ARCH_MODEL_STATEDATA_64_H +#pragma once #include #include @@ -35,4 +34,3 @@ extern hw_asid_t armKSNextASID VISIBLE; pde_t *armKSGlobalLogPDE; #endif -#endif /* __ARCH_MODEL_STATEDATA_64_H */ diff --git a/include/arch/arm/arch/64/mode/object/structures.h b/include/arch/arm/arch/64/mode/object/structures.h index 524797dcf..b06a8bc87 100644 --- a/include/arch/arm/arch/64/mode/object/structures.h +++ b/include/arch/arm/arch/64/mode/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_64_H -#define __ARCH_OBJECT_STRUCTURES_64_H +#pragma once #include #include @@ -280,4 +279,3 @@ static inline pte_t pte_invalid_new(void) }; } -#endif /* __ARCH_OBJECT_STRUCTURES_64_H */ diff --git a/include/arch/arm/arch/64/mode/smp/ipi.h b/include/arch/arm/arch/64/mode/smp/ipi.h index 9c2f0b59f..6c5d0359a 100644 --- a/include/arch/arm/arch/64/mode/smp/ipi.h +++ b/include/arch/arm/arch/64/mode/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_IPI_H -#define __MODE_SMP_IPI_H +#pragma once #include #include @@ -19,4 +18,3 @@ typedef enum { } IpiModeRemoteCall_t; #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODE_SMP_IPI_H */ \ No newline at end of file diff --git a/include/arch/arm/arch/64/mode/smp/smp.h b/include/arch/arm/arch/64/mode/smp/smp.h index 047dc50a2..65fc85632 100644 --- a/include/arch/arm/arch/64/mode/smp/smp.h +++ b/include/arch/arm/arch/64/mode/smp/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_H_ -#define __MODE_SMP_H_ +#pragma once #include #include @@ -35,4 +34,3 @@ getCurrentCPUIndex(void) } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODE_SMP_H_ */ diff --git a/include/arch/arm/arch/64/mode/types.h b/include/arch/arm/arch/64/mode/types.h index 5face8d4f..f24f868d7 100644 --- a/include/arch/arm/arch/64/mode/types.h +++ b/include/arch/arm/arch/64/mode/types.h @@ -4,12 +4,11 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H_ -#define __ARCH_MODE_TYPES_H_ +#pragma once #define wordRadix 6 #define wordBits (1 << wordRadix) typedef uint64_t timestamp_t; -#endif /* __ARCH_MODE_TYPES_H_ */ + diff --git a/include/arch/arm/arch/api/types.h b/include/arch/arm/arch/api/types.h index 4c25f2824..e7495b271 100644 --- a/include/arch/arm/arch/api/types.h +++ b/include/arch/arm/arch/api/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_API_TYPES_H -#define __ARCH_API_TYPES_H +#pragma once #include #include @@ -21,4 +20,4 @@ enum asidConstants { typedef word_t asid_t; -#endif + diff --git a/include/arch/arm/arch/benchmark.h b/include/arch/arm/arch/benchmark.h index 641b07a22..1e7046c8d 100644 --- a/include/arch/arm/arch/benchmark.h +++ b/include/arch/arm/arch/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARCH_BENCHMARK_H -#define ARCH_BENCHMARK_H +#pragma once #include #ifdef CONFIG_ENABLE_BENCHMARKS @@ -48,4 +47,3 @@ static inline void benchmark_arch_utilisation_reset(void) #endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */ #endif /* CONFIG_ENABLE_BENCHMARKS */ -#endif /* ARCH_BENCHMARK_H */ diff --git a/include/arch/arm/arch/bootinfo.h b/include/arch/arm/arch/bootinfo.h index 515cadd97..025c7cd06 100644 --- a/include/arch/arm/arch/bootinfo.h +++ b/include/arch/arm/arch/bootinfo.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_BOOTINFO_H -#define __ARCH_BOOTINFO_H +#pragma once /* Modifiers: * + 1: allow the kernel to release its own boot data region @@ -21,4 +20,4 @@ */ #define MAX_NUM_RESV_REG (MAX_NUM_FREEMEM_REG + ARRAY_SIZE(kernel_devices) + MODE_RESERVED + 3) -#endif + diff --git a/include/arch/arm/arch/fastpath/fastpath.h b/include/arch/arm/arch/fastpath/fastpath.h index 5bafcf3e5..61b06643b 100644 --- a/include/arch/arm/arch/fastpath/fastpath.h +++ b/include/arch/arm/arch/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_H -#define __ARCH_FASTPATH_H +#pragma once #include #include @@ -27,5 +26,4 @@ void fastpath_reply_recv(word_t cptr, word_t r_msgInfo) #endif NORETURN; -#endif /* __ARCH_FASTPATH_H */ diff --git a/include/arch/arm/arch/kernel/boot.h b/include/arch/arm/arch/kernel/boot.h index 074abeefe..6a55c0000 100644 --- a/include/arch/arm/arch/kernel/boot.h +++ b/include/arch/arm/arch/kernel/boot.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_BOOT_H -#define __ARCH_KERNEL_BOOT_H +#pragma once #include @@ -22,4 +21,3 @@ void init_kernel( uint32_t dtb_size ); -#endif diff --git a/include/arch/arm/arch/kernel/thread.h b/include/arch/arm/arch/kernel/thread.h index 54b7cab16..fc1ac5731 100644 --- a/include/arch/arm/arch/kernel/thread.h +++ b/include/arch/arm/arch/kernel/thread.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_THREAD_H -#define __ARCH_KERNEL_THREAD_H +#pragma once #include #include @@ -15,4 +14,3 @@ void Arch_switchToIdleThread(void); void Arch_configureIdleThread(tcb_t *tcb); void Arch_activateIdleThread(tcb_t *tcb); -#endif diff --git a/include/arch/arm/arch/kernel/traps.h b/include/arch/arm/arch/kernel/traps.h index 91124c421..90b2a1192 100644 --- a/include/arch/arm/arch/kernel/traps.h +++ b/include/arch/arm/arch/kernel/traps.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_ARM_TRAPS_H -#define __KERNEL_ARM_TRAPS_H +#pragma once #include #include @@ -60,4 +59,3 @@ void c_handle_enfp(void) VISIBLE SECTION(".vectors.text"); #endif /* CONFIG_HAVE_FPU */ -#endif /* __KERNEL_ARM_TRAPS_H */ diff --git a/include/arch/arm/arch/kernel/vspace.h b/include/arch/arm/arch/kernel/vspace.h index 5598863d6..8d4f0a603 100644 --- a/include/arch/arm/arch/kernel/vspace.h +++ b/include/arch/arm/arch/kernel/vspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_VSPACE_H -#define __ARCH_KERNEL_VSPACE_H +#pragma once #include #include @@ -52,4 +51,3 @@ exception_t decodeARMMMUInvocation(word_t invLabel, word_t length, cptr_t cptr, void Arch_userStackTrace(tcb_t *tptr); #endif -#endif /* __ARCH_KERNEL_VSPACE_H */ diff --git a/include/arch/arm/arch/linker.h b/include/arch/arm/arch/linker.h index 59b58904f..0de65f5bb 100644 --- a/include/arch/arm/arch/linker.h +++ b/include/arch/arm/arch/linker.h @@ -4,9 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __ARCH_LINKER_H -#define __ARCH_LINKER_H - +#pragma once /* Place-holder for ARM-related linker definitions */ -#endif /* __ARCH_LINKER_H */ diff --git a/include/arch/arm/arch/machine.h b/include/arch/arm/arch/machine.h index 62073ae02..9448eba90 100644 --- a/include/arch/arm/arch/machine.h +++ b/include/arch/arm/arch/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_H -#define __ARCH_MACHINE_H +#pragma once #include #include @@ -84,4 +83,3 @@ static inline exception_t Arch_setTLSRegister(word_t tls_base) #endif /* __ASSEMBLER__ */ -#endif /* __ARCH_MACHINE_H */ diff --git a/include/arch/arm/arch/machine/capdl.h b/include/arch/arm/arch/machine/capdl.h index 847012f84..edcf837c9 100644 --- a/include/arch/arm/arch/machine/capdl.h +++ b/include/arch/arm/arch/machine/capdl.h @@ -4,9 +4,6 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_CAPDL_H -#define __ARCH_MACHINE_CAPDL_H +#pragma once void capDL(void); - -#endif diff --git a/include/arch/arm/arch/machine/debug.h b/include/arch/arm/arch/machine/debug.h index de090cc1f..c35e4025f 100644 --- a/include/arch/arm/arch/machine/debug.h +++ b/include/arch/arm/arch/machine/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_DEBUG_H -#define __ARCH_MACHINE_DEBUG_H +#pragma once #include #include @@ -270,4 +269,3 @@ static inline syscall_error_t Arch_decodeUnsetBreakpoint(tcb_t *t, uint16_t bp_n #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* !__ARCH_MACHINE_DEBUG_H */ diff --git a/include/arch/arm/arch/machine/debug_conf.h b/include/arch/arm/arch/machine/debug_conf.h index 07b94e704..d14323736 100644 --- a/include/arch/arm/arch/machine/debug_conf.h +++ b/include/arch/arm/arch/machine/debug_conf.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARCH_MACHINE_DEBUG_CONF_H -#define ARCH_MACHINE_DEBUG_CONF_H +#pragma once #include @@ -46,4 +45,3 @@ #define ARM_HYP_TRAP_CP14 #endif -#endif /* ARCH_MACHINE_DEBUG_CONF_H */ diff --git a/include/arch/arm/arch/machine/fpu.h b/include/arch/arm/arch/machine/fpu.h index e3445878f..6e03623d4 100644 --- a/include/arch/arm/arch/machine/fpu.h +++ b/include/arch/arm/arch/machine/fpu.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_FPU_H -#define __ARCH_MACHINE_FPU_H - +#pragma once #include bool_t fpsimd_HWCapTest(void); bool_t fpsimd_init(void); -#endif /* __ARCH_MACHINE_FPU_H */ + diff --git a/include/arch/arm/arch/machine/gic_common.h b/include/arch/arm/arch/machine/gic_common.h index 64f671ae8..943a9171d 100644 --- a/include/arch/arm/arch/machine/gic_common.h +++ b/include/arch/arm/arch/machine/gic_common.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_GIC_COMMON_H -#define __ARCH_MACHINE_GIC_COMMON_H +#pragma once #include #include @@ -80,4 +79,3 @@ static inline void handleSpuriousIRQ(void) void initIRQController(void); -#endif /* __ARCH_MACHINE_GIC_COMMON_H */ diff --git a/include/arch/arm/arch/machine/gic_v2.h b/include/arch/arm/arch/machine/gic_v2.h index 17366e09b..585693f48 100644 --- a/include/arch/arm/arch/machine/gic_v2.h +++ b/include/arch/arm/arch/machine/gic_v2.h @@ -7,8 +7,7 @@ /* * ARM Generic Interrupt Controller PL-390 */ -#ifndef __ARCH_MACHINE_GIC_V2_H -#define __ARCH_MACHINE_GIC_V2_H +#pragma once /* tell the kernel we have the set trigger feature */ #define HAVE_SET_TRIGGER 1 @@ -299,5 +298,3 @@ static inline void set_gic_vcpu_ctrl_lr(int num, virq_t lr) } #endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */ - -#endif /* !__ARCH_MACHINE_GIC_V2_H */ diff --git a/include/arch/arm/arch/machine/gic_v3.h b/include/arch/arm/arch/machine/gic_v3.h index b3907b2cd..56172dcfd 100644 --- a/include/arch/arm/arch/machine/gic_v3.h +++ b/include/arch/arm/arch/machine/gic_v3.h @@ -9,8 +9,7 @@ * Arm Generic Interrupt Controller v3 */ -#ifndef ARCH_MACHINE_GIC_3_H -#define ARCH_MACHINE_GIC_3_H +#pragma once /* tell the kernel we have the set trigger feature */ #define HAVE_SET_TRIGGER 1 @@ -287,4 +286,3 @@ static inline void ackInterrupt(irq_t irq) } -#endif /* ARCH_MACHINE_GIC_3_H */ diff --git a/include/arch/arm/arch/machine/hardware.h b/include/arch/arm/arch/machine/hardware.h index 8de402ea3..a59be78f0 100644 --- a/include/arch/arm/arch/machine/hardware.h +++ b/include/arch/arm/arch/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_HARDWARE_H -#define __ARCH_MACHINE_HARDWARE_H +#pragma once #include #include @@ -31,4 +30,3 @@ typedef word_t vm_fault_type_t; #define L1_CACHE_LINE_SIZE_BITS CONFIG_L1_CACHE_LINE_SIZE_BITS #define L1_CACHE_LINE_SIZE BIT(L1_CACHE_LINE_SIZE_BITS) -#endif /* !__ARCH_MACHINE_HARDWARE_H */ diff --git a/include/arch/arm/arch/machine/l2c_310.h b/include/arch/arm/arch/machine/l2c_310.h index 0edfdf7b8..a4d21cda9 100644 --- a/include/arch/arm/arch/machine/l2c_310.h +++ b/include/arch/arm/arch/machine/l2c_310.h @@ -8,8 +8,7 @@ * ARM L2 Cache controller L2C-310 */ -#ifndef __ARCH_MACHINE_L2C_310_H -#define __ARCH_MACHINE_L2C_310_H +#pragma once #include @@ -22,4 +21,3 @@ void plat_cleanL2Range(paddr_t start, paddr_t end); void plat_invalidateL2Range(paddr_t start, paddr_t end); void plat_cleanInvalidateL2Range(paddr_t start, paddr_t end); -#endif /* !__ARCH_MACHINE_L2C_310_H */ diff --git a/include/arch/arm/arch/machine/registerset.h b/include/arch/arm/arch/machine/registerset.h index b743ff6ca..7cbf484c3 100644 --- a/include/arch/arm/arch/machine/registerset.h +++ b/include/arch/arm/arch/machine/registerset.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_REGISTERSET_H -#define __ARCH_MACHINE_REGISTERSET_H +#pragma once #include -#endif /* __ARCH_MACHINE_REGISTERSET_H */ diff --git a/include/arch/arm/arch/machine/timer.h b/include/arch/arm/arch/machine/timer.h index 0973a4ba9..c41cf1430 100644 --- a/include/arch/arm/arch/machine/timer.h +++ b/include/arch/arm/arch/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_TIMER_H_ -#define __ARCH_MACHINE_TIMER_H_ +#pragma once #include #include @@ -69,4 +68,3 @@ static inline CONST ticks_t getTimerPrecision(void) void initTimer(void); #endif -#endif /* __ARCH_MACHINE_TIMER_H_ */ diff --git a/include/arch/arm/arch/machine/tlb.h b/include/arch/arm/arch/machine/tlb.h index 662503887..7235672db 100644 --- a/include/arch/arm/arch/machine/tlb.h +++ b/include/arch/arm/arch/machine/tlb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_TLB_H -#define __ARCH_MACHINE_TLB_H +#pragma once #include #include @@ -54,4 +53,3 @@ static inline void invalidateTranslationAll(void) SMP_COND_STATEMENT(doRemoteInvalidateTranslationAll(MASK(CONFIG_MAX_NUM_NODES))); } -#endif /* __ARCH_MACHINE_TLB_H */ diff --git a/include/arch/arm/arch/model/smp.h b/include/arch/arm/arch/model/smp.h index b8027259a..1bf4c3089 100644 --- a/include/arch/arm/arch/model/smp.h +++ b/include/arch/arm/arch/model/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_SMP_H_ -#define __ARCH_MODEL_SMP_H_ +#pragma once #include #include @@ -47,4 +46,3 @@ static inline bool_t try_arch_atomic_exchange(void *ptr, void *new_val, void **p #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_MODEL_SMP_H_ */ diff --git a/include/arch/arm/arch/model/statedata.h b/include/arch/arm/arch/model/statedata.h index 452af0f62..1953483d6 100644 --- a/include/arch/arm/arch/model/statedata.h +++ b/include/arch/arm/arch/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_H -#define __ARCH_MODEL_STATEDATA_H +#pragma once #include #include @@ -34,4 +33,3 @@ extern user_breakpoint_state_t armKSNullBreakpointState VISIBLE; extern word_t armKSGlobalsFrame[BIT(ARMSmallPageBits) / sizeof(word_t)]; #endif -#endif /* __ARCH_MODEL_STATEDATA_H */ diff --git a/include/arch/arm/arch/object/interrupt.h b/include/arch/arm/arch/object/interrupt.h index beb90668b..c263a8609 100644 --- a/include/arch/arm/arch/object/interrupt.h +++ b/include/arch/arm/arch/object/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_INTERRUPT_H -#define __ARCH_OBJECT_INTERRUPT_H +#pragma once #include #include @@ -65,4 +64,3 @@ static inline exception_t Arch_checkIRQ(word_t irq_w) return EXCEPTION_NONE; } -#endif diff --git a/include/arch/arm/arch/object/iospace.h b/include/arch/arm/arch/object/iospace.h index b1f24979d..56a6a38db 100644 --- a/include/arch/arm/arch/object/iospace.h +++ b/include/arch/arm/arch/object/iospace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_IOSPACE_H -#define __ARCH_OBJECT_IOSPACE_H +#pragma once #include #include @@ -68,5 +67,4 @@ static inline void clearIOPageDirectory(cap_t cap) #endif /* end of !CONFIG_ARM_SMMU */ -#endif diff --git a/include/arch/arm/arch/object/objecttype.h b/include/arch/arm/arch/object/objecttype.h index d102f6bba..b11096020 100644 --- a/include/arch/arm/arch/object/objecttype.h +++ b/include/arch/arm/arch/object/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_OBJECTTYPE_H -#define __ARCH_OBJECT_OBJECTTYPE_H +#pragma once #include #include @@ -30,5 +29,3 @@ word_t Arch_getObjectSize(word_t t); static inline void Arch_postCapDeletion(cap_t cap) { } - -#endif diff --git a/include/arch/arm/arch/object/structures.h b/include/arch/arm/arch/object/structures.h index a6c8bf8a5..7da1e1161 100644 --- a/include/arch/arm/arch/object/structures.h +++ b/include/arch/arm/arch/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_H -#define __ARCH_OBJECT_STRUCTURES_H +#pragma once #include @@ -16,4 +15,4 @@ static inline bool_t CONST Arch_isCapRevocable(cap_t derivedCap, cap_t srcCap) return false; } -#endif + diff --git a/include/arch/arm/arch/object/vcpu.h b/include/arch/arm/arch/object/vcpu.h index 616df2709..4b527cb0a 100644 --- a/include/arch/arm/arch/object/vcpu.h +++ b/include/arch/arm/arch/object/vcpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_VCPU_H -#define __ARCH_OBJECT_VCPU_H +#pragma once #include @@ -200,4 +199,3 @@ static inline void VGICMaintenance(void) {} #endif /* end of !CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif /* __ARCH_OBJECT_VCPU_H */ diff --git a/include/arch/arm/arch/smp/ipi.h b/include/arch/arm/arch/smp/ipi.h index 26d04bd19..8ecc87c06 100644 --- a/include/arch/arm/arch/smp/ipi.h +++ b/include/arch/arm/arch/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_SMP_IPI_H -#define __ARCH_SMP_IPI_H +#pragma once #include @@ -25,4 +24,4 @@ typedef enum { } IpiRemoteCall_t; #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_SMP_IPI_H */ + diff --git a/include/arch/arm/arch/smp/ipi_inline.h b/include/arch/arm/arch/smp/ipi_inline.h index 9cf6e8caf..529bfbbb5 100644 --- a/include/arch/arm/arch/smp/ipi_inline.h +++ b/include/arch/arm/arch/smp/ipi_inline.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_SMP_IPI_INLINE_H -#define __ARCH_SMP_IPI_INLINE_H +#pragma once #include #include @@ -43,4 +42,4 @@ static inline void doRemoteMaskPrivateInterrupt(word_t cpu, word_t disable, word doRemoteOp2Arg(IpiRemoteCall_MaskPrivateInterrupt, disable, irq, cpu); } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_SMP_IPI_INLINE_H */ + diff --git a/include/arch/arm/arch/types.h b/include/arch/arm/arch/types.h index 4d020c19c..dee73e379 100644 --- a/include/arch/arm/arch/types.h +++ b/include/arch/arm/arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_TYPES_H -#define __ARCH_TYPES_H +#pragma once #include #include @@ -51,4 +50,3 @@ typedef struct kernel_frame { int userAvailable; } kernel_frame_t; -#endif diff --git a/include/arch/arm/arch/user_access.h b/include/arch/arm/arch/user_access.h index 8f1e587d0..991768a5a 100644 --- a/include/arch/arm/arch/user_access.h +++ b/include/arch/arm/arch/user_access.h @@ -3,10 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef ARCH_USER_ACCESS_H -#define ARCH_USER_ACCESS_H +#pragma once void armv_init_user_access(void); -#endif /* ARCH_USER_ACCESS_H */ diff --git a/include/arch/arm/armv/armv6/armv/benchmark.h b/include/arch/arm/armv/armv6/armv/benchmark.h index 683ed7dd3..ee22190e1 100644 --- a/include/arch/arm/armv/armv6/armv/benchmark.h +++ b/include/arch/arm/armv/armv6/armv/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARMV_BENCHMARK_H -#define ARMV_BENCHMARK_H +#pragma once #include #ifdef CONFIG_ENABLE_BENCHMARKS @@ -36,4 +35,3 @@ static inline void armv_handleOverflowIRQ(void) MCR(PMCR, pmcr); } #endif /* CONFIG_ENABLE_BENCHMARKS */ -#endif /* ARMV_BENCHMARK_H */ diff --git a/include/arch/arm/armv/armv6/armv/context_switch.h b/include/arch/arm/armv/armv6/armv/context_switch.h index 702f38afe..d32447481 100644 --- a/include/arch/arm/armv/armv6/armv/context_switch.h +++ b/include/arch/arm/armv/armv6/armv/context_switch.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARMV_CONTEXT_SWITCH_H__ -#define __ARMV_CONTEXT_SWITCH_H__ +#pragma once #include #include @@ -29,4 +28,3 @@ static inline void armv_contextSwitch(pde_t *cap_pd, asid_t asid) armv_contextSwitch_HWASID(cap_pd, getHWASID(asid)); } -#endif /* __ARMV_CONTEXT_SWITCH_H__ */ diff --git a/include/arch/arm/armv/armv6/armv/debug.h b/include/arch/arm/armv/armv6/armv/debug.h index 9fc731239..bfb1a7712 100644 --- a/include/arch/arm/armv/armv6/armv/debug.h +++ b/include/arch/arm/armv/armv6/armv/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_DEBUG_H_ -#define __ARCH_ARMV_DEBUG_H_ +#pragma once #include #ifdef CONFIG_HARDWARE_DEBUG_API @@ -133,4 +132,3 @@ static inline bool_t Arch_breakpointIsMismatch(dbg_bcr_t in_val) } #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* __ARCH_ARMV_DEBUG_H_ */ diff --git a/include/arch/arm/armv/armv6/armv/machine.h b/include/arch/arm/armv/armv6/armv/machine.h index 3c3436598..504d683f3 100644 --- a/include/arch/arm/armv/armv6/armv/machine.h +++ b/include/arch/arm/armv/armv6/armv/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV6_MACHINE_H -#define __ARCH_ARMV6_MACHINE_H +#pragma once static inline void wfi(void) { @@ -56,4 +55,3 @@ static inline void isb(void) #define SYSTEM_WRITE_64(reg, v) MCRR(reg, v) #define SYSTEM_READ_64(reg, v) MRRC(reg, v) -#endif diff --git a/include/arch/arm/armv/armv7-a/armv/benchmark.h b/include/arch/arm/armv/armv7-a/armv/benchmark.h index 65681339b..bdd346759 100644 --- a/include/arch/arm/armv/armv7-a/armv/benchmark.h +++ b/include/arch/arm/armv/armv7-a/armv/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARMV_BENCHMARK_H -#define ARMV_BENCHMARK_H +#pragma once #ifdef CONFIG_ENABLE_BENCHMARKS #include @@ -31,4 +30,4 @@ static inline void armv_handleOverflowIRQ(void) MCR(PMOVSR, val); } #endif /* CONFIG_ENABLE_BENCHMARKS */ -#endif /* ARMV_BENCHMARK_H */ + diff --git a/include/arch/arm/armv/armv7-a/armv/context_switch.h b/include/arch/arm/armv/armv7-a/armv/context_switch.h index d04b88a31..b952dce08 100644 --- a/include/arch/arm/armv/armv7-a/armv/context_switch.h +++ b/include/arch/arm/armv/armv7-a/armv/context_switch.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARMV_CONTEXT_SWITCH_H__ -#define __ARMV_CONTEXT_SWITCH_H__ +#pragma once #include #include @@ -52,4 +51,3 @@ static inline void armv_contextSwitch(pde_t *cap_pd, asid_t asid) armv_contextSwitch_HWASID(cap_pd, getHWASID(asid)); } -#endif /* __ARMV_CONTEXT_SWITCH_H__ */ diff --git a/include/arch/arm/armv/armv7-a/armv/debug.h b/include/arch/arm/armv/armv7-a/armv/debug.h index 5f21bec49..4a546a800 100644 --- a/include/arch/arm/armv/armv7-a/armv/debug.h +++ b/include/arch/arm/armv/armv7-a/armv/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_DEBUG_H_ -#define __ARCH_ARMV_DEBUG_H_ +#pragma once #include @@ -172,4 +171,4 @@ static inline bool_t Arch_breakpointIsMismatch(dbg_bcr_t in_val) } #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* __ARCH_ARMV_DEBUG_H_ */ + diff --git a/include/arch/arm/armv/armv7-a/armv/machine.h b/include/arch/arm/armv/armv7-a/armv/machine.h index 4448b91b7..a21bdf7a3 100644 --- a/include/arch/arm/armv/armv7-a/armv/machine.h +++ b/include/arch/arm/armv/armv7-a/armv/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV7A_MACHINE_H -#define __ARCH_ARMV7A_MACHINE_H +#pragma once #include @@ -49,5 +48,3 @@ void lockTLBEntryCritical(unsigned int addr, unsigned int x, unsigned int y); #define SYSTEM_READ_WORD(reg, v) MRC(reg, v) #define SYSTEM_WRITE_64(reg, v) MCRR(reg, v) #define SYSTEM_READ_64(reg, v) MRRC(reg, v) - -#endif diff --git a/include/arch/arm/armv/armv7-a/armv/vcpu.h b/include/arch/arm/armv/armv7-a/armv/vcpu.h index 443a1ea25..9adb1ad21 100644 --- a/include/arch/arm/armv/armv7-a/armv/vcpu.h +++ b/include/arch/arm/armv/armv7-a/armv/vcpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_VCPU_H_ -#define __ARCH_ARMV_VCPU_H_ +#pragma once #include @@ -863,5 +862,3 @@ static inline bool_t armv_handleVCPUFault(word_t hsr) #endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif - diff --git a/include/arch/arm/armv/armv8-a/64/armv/benchmark.h b/include/arch/arm/armv/armv8-a/64/armv/benchmark.h index 07462c777..39db5d1c1 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/benchmark.h +++ b/include/arch/arm/armv/armv8-a/64/armv/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARMV_BENCHMARK_H -#define ARMV_BENCHMARK_H +#pragma once #include #ifdef CONFIG_ENABLE_BENCHMARKS @@ -32,4 +31,4 @@ static inline void armv_handleOverflowIRQ(void) } #endif /* CONFIG_ENABLE_BENCHMARKS */ -#endif /* ARMV_BENCHMARK_H */ + diff --git a/include/arch/arm/armv/armv8-a/64/armv/context_switch.h b/include/arch/arm/armv/armv8-a/64/armv/context_switch.h index 642cdcf9d..3b71b1409 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/context_switch.h +++ b/include/arch/arm/armv/armv8-a/64/armv/context_switch.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARMV_CONTEXT_SWITCH_H__ -#define __ARMV_CONTEXT_SWITCH_H__ +#pragma once #include #include @@ -22,4 +21,3 @@ static inline void armv_contextSwitch(vspace_root_t *vspace, asid_t asid) setCurrentUserVSpaceRoot(ttbr_new(asid, pptr_to_paddr(vspace))); } -#endif /* __ARMV_CONTEXT_SWITCH_H__ */ diff --git a/include/arch/arm/armv/armv8-a/64/armv/debug.h b/include/arch/arm/armv/armv8-a/64/armv/debug.h index a56c4008d..207ab6f94 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/debug.h +++ b/include/arch/arm/armv/armv8-a/64/armv/debug.h @@ -4,8 +4,5 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_DEBUG_H_ -#define __ARCH_ARMV_DEBUG_H_ +#pragma once - -#endif /* __ARCH_ARMV_DEBUG_H_ */ diff --git a/include/arch/arm/armv/armv8-a/64/armv/machine.h b/include/arch/arm/armv/armv8-a/64/armv/machine.h index ca25884e7..4744d2314 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/machine.h +++ b/include/arch/arm/armv/armv8-a/64/armv/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_MACHINE_H -#define __ARCH_ARMV_MACHINE_H +#pragma once static inline void wfi(void) { @@ -39,4 +38,3 @@ static inline void isb(void) #define SYSTEM_WRITE_64(reg, v) MSR(reg, v) #define SYSTEM_READ_64(reg, v) MRS(reg, v) -#endif /* __ARCH_ARMV_MACHINE_H */ diff --git a/include/arch/arm/armv/armv8-a/64/armv/tlb.h b/include/arch/arm/armv/armv8-a/64/armv/tlb.h index 502af3046..7761618ce 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/tlb.h +++ b/include/arch/arm/armv/armv8-a/64/armv/tlb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_TLB_H -#define __ARCH_ARMV_TLB_H +#pragma once #include #include @@ -51,5 +50,4 @@ static inline void invalidateLocalTLB_IPA_VMID(word_t ipa_plus_vmid) } } -#endif diff --git a/include/arch/arm/armv/armv8-a/64/armv/vcpu.h b/include/arch/arm/armv/armv8-a/64/armv/vcpu.h index 540912d4c..9bda8e5ba 100644 --- a/include/arch/arm/armv/armv8-a/64/armv/vcpu.h +++ b/include/arch/arm/armv/armv8-a/64/armv/vcpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_ARMV_VCPU_H_ -#define __ARCH_ARMV_VCPU_H_ +#pragma once #include @@ -646,5 +645,4 @@ static inline bool_t armv_handleVCPUFault(word_t hsr) #endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif diff --git a/include/arch/riscv/arch/32/mode/hardware.h b/include/arch/riscv/arch/32/mode/hardware.h index 818d3f1ec..f790cf5a0 100644 --- a/include/arch/riscv/arch/32/mode/hardware.h +++ b/include/arch/riscv/arch/32/mode/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_HARDWARE_H -#define __ARCH_MODE_HARDWARE_H +#pragma once #define LOAD lw #define STORE sw @@ -49,4 +48,3 @@ static inline uint64_t riscv_read_time(void) #endif /* __ASSEMBLER__ */ -#endif /* __ARCH_MODE_HARDWARE_H */ diff --git a/include/arch/riscv/arch/32/mode/kernel/stack.h b/include/arch/riscv/arch/32/mode/kernel/stack.h index b00f9cd32..a0eaa8780 100644 --- a/include/arch/riscv/arch/32/mode/kernel/stack.h +++ b/include/arch/riscv/arch/32/mode/kernel/stack.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once #include #include @@ -16,4 +15,3 @@ #define KERNEL_STACK_ALIGNMENT 4 #endif -#endif /* __KERNEL_MODE_STACK_H */ diff --git a/include/arch/riscv/arch/32/mode/machine.h b/include/arch/riscv/arch/32/mode/machine.h index d7bbacd4e..2adaa2b9a 100644 --- a/include/arch/riscv/arch/32/mode/machine.h +++ b/include/arch/riscv/arch/32/mode/machine.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_H -#define __ARCH_MODE_MACHINE_H +#pragma once /* Place holder for 32-bit machine header */ -#endif /* __ARCH_MODE_MACHINE_H */ diff --git a/include/arch/riscv/arch/32/mode/object/structures.h b/include/arch/riscv/arch/32/mode/object/structures.h index 10e5c072f..9d07992a8 100644 --- a/include/arch/riscv/arch/32/mode/object/structures.h +++ b/include/arch/riscv/arch/32/mode/object/structures.h @@ -5,7 +5,6 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_32_H -#define __ARCH_OBJECT_STRUCTURES_32_H +#pragma once + -#endif /* __ARCH_OBJECT_STRUCTURES_32_H */ diff --git a/include/arch/riscv/arch/32/mode/types.h b/include/arch/riscv/arch/32/mode/types.h index 9839d849d..db45e149c 100644 --- a/include/arch/riscv/arch/32/mode/types.h +++ b/include/arch/riscv/arch/32/mode/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H -#define __ARCH_MODE_TYPES_H +#pragma once #include #include @@ -15,4 +14,3 @@ compile_assert(long_is_32bits, sizeof(unsigned long) == 4) #define wordRadix 5 -#endif diff --git a/include/arch/riscv/arch/64/mode/hardware.h b/include/arch/riscv/arch/64/mode/hardware.h index e2653610f..8aaac0ce2 100644 --- a/include/arch/riscv/arch/64/mode/hardware.h +++ b/include/arch/riscv/arch/64/mode/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_HARDWARE_H -#define __ARCH_MODE_HARDWARE_H +#pragma once #define LOAD ld #define STORE sd @@ -107,4 +106,3 @@ static inline uint64_t riscv_read_time(void) #endif /* __ASSEMBLER__ */ -#endif /* __ARCH_MODE_HARDWARE_H */ diff --git a/include/arch/riscv/arch/64/mode/kernel/stack.h b/include/arch/riscv/arch/64/mode/kernel/stack.h index 4bbcf7176..49431773e 100644 --- a/include/arch/riscv/arch/64/mode/kernel/stack.h +++ b/include/arch/riscv/arch/64/mode/kernel/stack.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once #include #include @@ -16,4 +15,4 @@ #define KERNEL_STACK_ALIGNMENT 8 #endif -#endif /* __KERNEL_MODE_STACK_H */ + diff --git a/include/arch/riscv/arch/64/mode/machine.h b/include/arch/riscv/arch/64/mode/machine.h index 615f38a0e..147d16ac0 100644 --- a/include/arch/riscv/arch/64/mode/machine.h +++ b/include/arch/riscv/arch/64/mode/machine.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_H -#define __ARCH_MODE_MACHINE_H +#pragma once /* Place holder for 64-bit machine header */ -#endif /* __ARCH_MODE_MACHINE_H */ diff --git a/include/arch/riscv/arch/64/mode/object/structures.h b/include/arch/riscv/arch/64/mode/object/structures.h index fd9bdb3cf..607bd69f2 100644 --- a/include/arch/riscv/arch/64/mode/object/structures.h +++ b/include/arch/riscv/arch/64/mode/object/structures.h @@ -5,7 +5,5 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_64_H -#define __ARCH_OBJECT_STRUCTURES_64_H +#pragma once -#endif /* __ARCH_OBJECT_STRUCTURES_64_H */ diff --git a/include/arch/riscv/arch/64/mode/smp/ipi.h b/include/arch/riscv/arch/64/mode/smp/ipi.h index 73a3a2a81..46281ccb7 100644 --- a/include/arch/riscv/arch/64/mode/smp/ipi.h +++ b/include/arch/riscv/arch/64/mode/smp/ipi.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_IPI_H -#define __MODE_SMP_IPI_H - -#endif /* __MODE_SMP_IPI_H */ +#pragma once \ No newline at end of file diff --git a/include/arch/riscv/arch/64/mode/types.h b/include/arch/riscv/arch/64/mode/types.h index 51acec274..dc4766e9e 100644 --- a/include/arch/riscv/arch/64/mode/types.h +++ b/include/arch/riscv/arch/64/mode/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H -#define __ARCH_MODE_TYPES_H +#pragma once #include #include @@ -15,4 +14,4 @@ compile_assert(long_is_64bits, sizeof(unsigned long) == 8) #define wordRadix 6 -#endif + diff --git a/include/arch/riscv/arch/api/types.h b/include/arch/riscv/arch/api/types.h index 8881e3c3d..75c794f86 100644 --- a/include/arch/riscv/arch/api/types.h +++ b/include/arch/riscv/arch/api/types.h @@ -8,8 +8,7 @@ * */ -#ifndef __ARCH_API_TYPES -#define __ARCH_API_TYPES +#pragma once #include #include @@ -27,4 +26,4 @@ enum asidConstants { typedef word_t asid_t; -#endif + diff --git a/include/arch/riscv/arch/benchmark.h b/include/arch/riscv/arch/benchmark.h index 938a13421..7d7fca696 100644 --- a/include/arch/riscv/arch/benchmark.h +++ b/include/arch/riscv/arch/benchmark.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARCH_BENCHMARK_H -#define ARCH_BENCHMARK_H +#pragma once #include #include @@ -14,4 +13,4 @@ #ifdef CONFIG_ENABLE_BENCHMARK #error "RISC-V doesn't support timestamp() function yet" #endif /* CONFIG_ENABLE_BENCHMARK */ -#endif /* ARCH_BENCHMARK_H */ + diff --git a/include/arch/riscv/arch/bootinfo.h b/include/arch/riscv/arch/bootinfo.h index 2306b9470..3e9b4aae6 100644 --- a/include/arch/riscv/arch/bootinfo.h +++ b/include/arch/riscv/arch/bootinfo.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_BOOTINFO_H -#define __ARCH_BOOTINFO_H - +#pragma once #define MAX_NUM_FREEMEM_REG 16 /* The maximum number of reserved regions is: @@ -22,4 +20,3 @@ #define MAX_NUM_RESV_REG (MAX_NUM_FREEMEM_REG + MODE_RESERVED + 3) #endif -#endif diff --git a/include/arch/riscv/arch/encoding.h b/include/arch/riscv/arch/encoding.h index 6aa2694e3..42121b23d 100644 --- a/include/arch/riscv/arch/encoding.h +++ b/include/arch/riscv/arch/encoding.h @@ -29,8 +29,7 @@ /* This file is copied from RISC-V tools, it might change for * new spec releases. */ -#ifndef RISCV_CSR_ENCODING_H -#define RISCV_CSR_ENCODING_H +#pragma once #define MSTATUS_UIE 0x00000001 #define MSTATUS_SIE 0x00000002 @@ -218,10 +217,9 @@ #define RISCV_PGSIZE (1 << RISCV_PGSHIFT) #endif -#endif /* __riscv */ + /* Automatically generated by parse-opcodes. */ -#ifndef RISCV_ENCODING_H -#define RISCV_ENCODING_H + #define MATCH_BEQ 0x63 #define MASK_BEQ 0x707f #define MATCH_BNE 0x1063 @@ -974,7 +972,7 @@ #define CAUSE_FETCH_PAGE_FAULT 0xc #define CAUSE_LOAD_PAGE_FAULT 0xd #define CAUSE_STORE_PAGE_FAULT 0xf -#endif + #ifdef DECLARE_INSN DECLARE_INSN(beq, MATCH_BEQ, MASK_BEQ) DECLARE_INSN(bne, MATCH_BNE, MASK_BNE) diff --git a/include/arch/riscv/arch/fastpath/fastpath.h b/include/arch/riscv/arch/fastpath/fastpath.h index 3296ea4a2..ae0aa3a30 100644 --- a/include/arch/riscv/arch/fastpath/fastpath.h +++ b/include/arch/riscv/arch/fastpath/fastpath.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_H -#define __ARCH_FASTPATH_H +#pragma once #include #include @@ -165,4 +164,4 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m UNREACHABLE(); } -#endif + diff --git a/include/arch/riscv/arch/kernel/boot.h b/include/arch/riscv/arch/kernel/boot.h index 01bc74a64..9ae257045 100644 --- a/include/arch/riscv/arch/kernel/boot.h +++ b/include/arch/riscv/arch/kernel/boot.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_BOOT_H -#define __ARCH_KERNEL_BOOT_H +#pragma once #include #include @@ -27,4 +26,4 @@ void init_kernel( #endif ); -#endif + diff --git a/include/arch/riscv/arch/kernel/thread.h b/include/arch/riscv/arch/kernel/thread.h index 1a193bea6..90681df34 100644 --- a/include/arch/riscv/arch/kernel/thread.h +++ b/include/arch/riscv/arch/kernel/thread.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_THREAD_H -#define __ARCH_KERNEL_THREAD_H +#pragma once #include @@ -20,4 +19,3 @@ static inline bool_t CONST Arch_getSanitiseRegisterInfo(tcb_t *thread) return 0; } -#endif diff --git a/include/arch/riscv/arch/kernel/traps.h b/include/arch/riscv/arch/kernel/traps.h index 04bdff992..eacce9419 100644 --- a/include/arch/riscv/arch/kernel/traps.h +++ b/include/arch/riscv/arch/kernel/traps.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_RISCV_TRAPS_H -#define __KERNEL_RISCV_TRAPS_H +#pragma once #include #include @@ -33,4 +32,4 @@ void restore_user_context(void) VISIBLE NORETURN; void handle_exception(void); -#endif /* __KERNEL_RISCV_TRAPS_H */ + diff --git a/include/arch/riscv/arch/kernel/vspace.h b/include/arch/riscv/arch/kernel/vspace.h index 151e07bcb..010de8877 100644 --- a/include/arch/riscv/arch/kernel/vspace.h +++ b/include/arch/riscv/arch/kernel/vspace.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_VSPACE_H -#define __ARCH_KERNEL_VSPACE_H +#pragma once #include #include @@ -67,4 +66,3 @@ void setVMRoot(tcb_t *tcb); void Arch_userStackTrace(tcb_t *tptr); #endif -#endif diff --git a/include/arch/riscv/arch/linker.h b/include/arch/riscv/arch/linker.h index 6f99b1320..c93ebcf76 100644 --- a/include/arch/riscv/arch/linker.h +++ b/include/arch/riscv/arch/linker.h @@ -5,9 +5,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_LINKER_H -#define __ARCH_LINKER_H +#pragma once #include -#endif + diff --git a/include/arch/riscv/arch/machine.h b/include/arch/riscv/arch/machine.h index 0381e6f96..34ccca7e8 100644 --- a/include/arch/riscv/arch/machine.h +++ b/include/arch/riscv/arch/machine.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_H -#define __ARCH_MACHINE_H +#pragma once #ifndef __ASSEMBLER__ #include @@ -259,5 +258,5 @@ static inline void Arch_setTLSRegister(word_t tls_base) } #endif // __ASSEMBLER__ -#endif + diff --git a/include/arch/riscv/arch/machine/capdl.h b/include/arch/riscv/arch/machine/capdl.h index 847012f84..f3b8c96ee 100644 --- a/include/arch/riscv/arch/machine/capdl.h +++ b/include/arch/riscv/arch/machine/capdl.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_CAPDL_H -#define __ARCH_MACHINE_CAPDL_H +#pragma once void capDL(void); -#endif diff --git a/include/arch/riscv/arch/machine/fpu.h b/include/arch/riscv/arch/machine/fpu.h index 814885121..207ab6f94 100644 --- a/include/arch/riscv/arch/machine/fpu.h +++ b/include/arch/riscv/arch/machine/fpu.h @@ -4,7 +4,5 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_FPU_H -#define __ARCH_MACHINE_FPU_H +#pragma once -#endif /* __ARCH_MACHINE_FPU_H */ diff --git a/include/arch/riscv/arch/machine/hardware.h b/include/arch/riscv/arch/machine/hardware.h index 70697a408..6e10e9309 100644 --- a/include/arch/riscv/arch/machine/hardware.h +++ b/include/arch/riscv/arch/machine/hardware.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_HARDWARE_H -#define __ARCH_MACHINE_HARDWARE_H +#pragma once #include @@ -129,4 +128,3 @@ static inline unsigned int CONST pageBitsForSize(vm_page_size_t pagesize) asm volatile("fence rw,rw" ::: "memory"); \ } while (0) -#endif /* !__ARCH_MACHINE_HARDWARE_H */ diff --git a/include/arch/riscv/arch/machine/plic.h b/include/arch/riscv/arch/machine/plic.h index 3ef78feab..f2a55a49a 100644 --- a/include/arch/riscv/arch/machine/plic.h +++ b/include/arch/riscv/arch/machine/plic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_PLIC_H -#define __ARCH_MACHINE_PLIC_H +#pragma once /* * RISC-V defines a Platform-level interrupt controller (PLIC) (priv-1.10). @@ -59,4 +58,3 @@ static inline void plic_init_controller(void) { } -#endif /* __ARCH_MACHINE_PLIC_H */ diff --git a/include/arch/riscv/arch/machine/registerset.h b/include/arch/riscv/arch/machine/registerset.h index 64115ca8a..ea1a11e43 100644 --- a/include/arch/riscv/arch/machine/registerset.h +++ b/include/arch/riscv/arch/machine/registerset.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_REGISTERSET_H -#define __ARCH_MACHINE_REGISTERSET_H +#pragma once #include "hardware.h" #include @@ -167,4 +166,3 @@ static inline word_t CONST sanitiseRegister(register_t reg, word_t v, bool_t arc #endif /* __ASSEMBLER__ */ -#endif /* !__ARCH_MACHINE_REGISTERSET_H */ diff --git a/include/arch/riscv/arch/machine/timer.h b/include/arch/riscv/arch/machine/timer.h index def1260a9..4e1034552 100644 --- a/include/arch/riscv/arch/machine/timer.h +++ b/include/arch/riscv/arch/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_TIMER_H -#define __ARCH_MACHINE_TIMER_H +#pragma once #ifdef CONFIG_KERNEL_MCS @@ -68,5 +67,3 @@ static inline void ackDeadlineIRQ(void) } #endif /* CONFIG_KERNEL_MCS */ - -#endif /* __ARCH_MACHINE_TIMER_H */ diff --git a/include/arch/riscv/arch/model/smp.h b/include/arch/riscv/arch/model/smp.h index 0e29fd92d..50c823eee 100644 --- a/include/arch/riscv/arch/model/smp.h +++ b/include/arch/riscv/arch/model/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_SMP_H_ -#define __ARCH_MODEL_SMP_H_ +#pragma once #include #include @@ -62,5 +61,4 @@ static inline CONST cpu_id_t getCurrentCPUIndex(void) #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_MODEL_SMP_H_ */ diff --git a/include/arch/riscv/arch/model/statedata.h b/include/arch/riscv/arch/model/statedata.h index b9d19d3fb..82f754aba 100644 --- a/include/arch/riscv/arch/model/statedata.h +++ b/include/arch/riscv/arch/model/statedata.h @@ -6,8 +6,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_H -#define __ARCH_MODEL_STATEDATA_H +#pragma once #include #include @@ -34,4 +33,3 @@ extern pte_t kernel_root_pageTable[BIT(PT_INDEX_BITS)] VISIBLE; extern pte_t kernel_image_level2_pt[BIT(PT_INDEX_BITS)]; #endif -#endif diff --git a/include/arch/riscv/arch/object/interrupt.h b/include/arch/riscv/arch/object/interrupt.h index 6775d93fe..a94c82804 100644 --- a/include/arch/riscv/arch/object/interrupt.h +++ b/include/arch/riscv/arch/object/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_INTERRUPT_H -#define __ARCH_OBJECT_INTERRUPT_H +#pragma once #include #include @@ -23,4 +22,3 @@ exception_t Arch_decodeIRQControlInvocation(word_t invLabel, word_t length, word_t *buffer); exception_t Arch_checkIRQ(word_t irq_w); -#endif diff --git a/include/arch/riscv/arch/object/objecttype.h b/include/arch/riscv/arch/object/objecttype.h index 72c2894f1..a2d9c6056 100644 --- a/include/arch/riscv/arch/object/objecttype.h +++ b/include/arch/riscv/arch/object/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_OBJECTTYPE_H -#define __ARCH_OBJECT_OBJECTTYPE_H +#pragma once #include #include @@ -31,4 +30,3 @@ static inline void Arch_postCapDeletion(cap_t cap) { } -#endif diff --git a/include/arch/riscv/arch/object/structures.h b/include/arch/riscv/arch/object/structures.h index 74a643be8..d1b97ee30 100644 --- a/include/arch/riscv/arch/object/structures.h +++ b/include/arch/riscv/arch/object/structures.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_H -#define __ARCH_OBJECT_STRUCTURES_H +#pragma once #ifndef __ASSEMBLER__ #include @@ -150,4 +149,4 @@ static inline bool_t CONST Arch_isCapRevocable(cap_t derivedCap, cap_t srcCap) } #endif /* !__ASSEMBLER__ */ -#endif + diff --git a/include/arch/riscv/arch/sbi.h b/include/arch/riscv/arch/sbi.h index af02a2f82..1d6725f7f 100644 --- a/include/arch/riscv/arch/sbi.h +++ b/include/arch/riscv/arch/sbi.h @@ -30,8 +30,8 @@ * new spec releases. */ -#ifndef _ASM_RISCV_SBI_H -#define _ASM_RISCV_SBI_H +#pragma once + #include @@ -121,4 +121,3 @@ static inline void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask, SBI_CALL_1(SBI_REMOTE_SFENCE_VMA_ASID, (register_t)hart_mask); } -#endif diff --git a/include/arch/riscv/arch/smp/ipi.h b/include/arch/riscv/arch/smp/ipi.h index 24c40febd..c3aef5f8b 100644 --- a/include/arch/riscv/arch/smp/ipi.h +++ b/include/arch/riscv/arch/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_SMP_IPI_H -#define __ARCH_SMP_IPI_H +#pragma once #include @@ -21,4 +20,3 @@ irq_t ipi_get_irq(void); void ipi_clear_irq(irq_t irq); #endif -#endif /* __ARCH_SMP_IPI_H */ diff --git a/include/arch/riscv/arch/smp/ipi_inline.h b/include/arch/riscv/arch/smp/ipi_inline.h index 264514eba..3efebb4fe 100644 --- a/include/arch/riscv/arch/smp/ipi_inline.h +++ b/include/arch/riscv/arch/smp/ipi_inline.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_SMP_IPI_INLINE_H -#define __ARCH_SMP_IPI_INLINE_H +#pragma once #ifdef ENABLE_SMP_SUPPORT @@ -22,5 +21,3 @@ static inline void doRemoteswitchFpuOwner(user_fpu_state_t *new_owner, word_t cp #endif /* CONFIG_HAVE_FPU */ #endif - -#endif /* __ARCH_SMP_IPI_INLINE_H */ diff --git a/include/arch/riscv/arch/types.h b/include/arch/riscv/arch/types.h index c9d4f7f6d..c3cc2fcdb 100644 --- a/include/arch/riscv/arch/types.h +++ b/include/arch/riscv/arch/types.h @@ -5,8 +5,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_TYPES_H -#define __ARCH_TYPES_H +#pragma once + #include #include @@ -41,4 +41,3 @@ typedef struct kernel_frame { int userAvailable; } kernel_frame_t; -#endif diff --git a/include/arch/x86/arch/32/mode/fastpath/fastpath.h b/include/arch/x86/arch/32/mode/fastpath/fastpath.h index 4bafb4256..6dab0b47c 100644 --- a/include/arch/x86/arch/32/mode/fastpath/fastpath.h +++ b/include/arch/x86/arch/32/mode/fastpath/fastpath.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_32_H -#define __ARCH_FASTPATH_32_H +#pragma once + #include #include @@ -135,4 +135,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m UNREACHABLE(); } -#endif diff --git a/include/arch/x86/arch/32/mode/hardware.h b/include/arch/x86/arch/32/mode/hardware.h index ca6e1eacc..af0778758 100644 --- a/include/arch/x86/arch/32/mode/hardware.h +++ b/include/arch/x86/arch/32/mode/hardware.h @@ -4,12 +4,11 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_HARDWARE_32_H -#define __ARCH_HARDWARE_32_H +#pragma once + #include #include #include #include -#endif /* __ARCH_HARDWARE_32_H */ diff --git a/include/arch/x86/arch/32/mode/kernel/elf.h b/include/arch/x86/arch/32/mode/kernel/elf.h index 17bdb6910..0e8ff1f89 100644 --- a/include/arch/x86/arch/32/mode/kernel/elf.h +++ b/include/arch/x86/arch/32/mode/kernel/elf.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_KERNEL_ELF_H_ -#define __ARCH_MODE_KERNEL_ELF_H_ +#pragma once + #include @@ -39,5 +39,3 @@ typedef struct Elf32_Phdr { uint32_t p_flags; /* Flags: logical "or" of PF_ constants below */ uint32_t p_align; /* Reqd alignment of segment in memory */ } Elf32_Phdr_t, Elf_Phdr_t; - -#endif /* __ARCH_MODE_KERNEL_ELF_H_ */ diff --git a/include/arch/x86/arch/32/mode/kernel/stack.h b/include/arch/x86/arch/32/mode/kernel/stack.h index 98527b24a..0fee89b47 100644 --- a/include/arch/x86/arch/32/mode/kernel/stack.h +++ b/include/arch/x86/arch/32/mode/kernel/stack.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once + #include #include @@ -16,4 +16,4 @@ #define KERNEL_STACK_ALIGNMENT 16 #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __KERNEL_MODE_STACK_H */ + diff --git a/include/arch/x86/arch/32/mode/kernel/tlb.h b/include/arch/x86/arch/32/mode/kernel/tlb.h index 8e790caca..7c86068a9 100644 --- a/include/arch/x86/arch/32/mode/kernel/tlb.h +++ b/include/arch/x86/arch/32/mode/kernel/tlb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_KERNEL_TLB_H -#define __MODE_KERNEL_TLB_H +#pragma once #include #include @@ -28,4 +27,3 @@ static inline void invalidateTLB(word_t mask) SMP_COND_STATEMENT(doRemoteInvalidateTLB(mask)); } -#endif /* __MODE_KERNEL_TLB_H */ diff --git a/include/arch/x86/arch/32/mode/kernel/vspace.h b/include/arch/x86/arch/32/mode/kernel/vspace.h index 166022de9..a2f659d45 100644 --- a/include/arch/x86/arch/32/mode/kernel/vspace.h +++ b/include/arch/x86/arch/32/mode/kernel/vspace.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_KERNEL_VSPACE_H -#define __MODE_KERNEL_VSPACE_H +#pragma once + #include @@ -36,4 +36,3 @@ static inline CONST pde_t x86_make_empty_root_mapping(void) return makeUserPDEInvalid(); } -#endif /* __MODE_KERNEL_VSPACE_H */ diff --git a/include/arch/x86/arch/32/mode/machine.h b/include/arch/x86/arch/32/mode/machine.h index e32f3f35f..f55e10f44 100644 --- a/include/arch/x86/arch/32/mode/machine.h +++ b/include/arch/x86/arch/32/mode/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_MACHINE_H -#define __MODE_MACHINE_H +#pragma once #include #include @@ -190,4 +189,3 @@ static inline void init_syscall_msrs(void) fail("syscall not supported on ia32"); } -#endif diff --git a/include/arch/x86/arch/32/mode/machine/cpu_registers.h b/include/arch/x86/arch/32/mode/machine/cpu_registers.h index 75af80eee..46e2e9ebd 100644 --- a/include/arch/x86/arch/32/mode/machine/cpu_registers.h +++ b/include/arch/x86/arch/32/mode/machine/cpu_registers.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_MACHINE_CPU_REGISTERS_H -#define __MODE_MACHINE_CPU_REGISTERS_H +#pragma once + static inline unsigned long read_cr3(void) { @@ -50,4 +50,3 @@ static inline void write_cr4(unsigned long value) asm volatile("movl %0, %%cr4" :: "r"(value), "m"(control_reg_order)); } -#endif diff --git a/include/arch/x86/arch/32/mode/machine/debug.h b/include/arch/x86/arch/32/mode/machine/debug.h index 278f4d157..a98cd3738 100644 --- a/include/arch/x86/arch/32/mode/machine/debug.h +++ b/include/arch/x86/arch/32/mode/machine/debug.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_DEBUG_H_ -#define __ARCH_MODE_MACHINE_DEBUG_H_ - +#pragma once #include #ifdef CONFIG_HARDWARE_DEBUG_API @@ -124,4 +122,3 @@ static inline void loadBreakpointState(tcb_t *source) } #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */ diff --git a/include/arch/x86/arch/32/mode/machine/registerset.h b/include/arch/x86/arch/32/mode/machine/registerset.h index ac26bf84e..32d0d3933 100644 --- a/include/arch/x86/arch/32/mode/machine/registerset.h +++ b/include/arch/x86/arch/32/mode/machine/registerset.h @@ -3,9 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __MODE_MACHINE_REGISTERSET_H -#define __MODE_MACHINE_REGISTERSET_H +#pragma once /* These are the indices of the registers in the * saved thread context. The values are determined @@ -115,5 +113,3 @@ enum messageSizes { extern const register_t msgRegisters[]; extern const register_t frameRegisters[]; extern const register_t gpRegisters[]; - -#endif diff --git a/include/arch/x86/arch/32/mode/model/smp.h b/include/arch/x86/arch/32/mode/model/smp.h index d9e2972aa..bcaddc59e 100644 --- a/include/arch/x86/arch/32/mode/model/smp.h +++ b/include/arch/x86/arch/32/mode/model/smp.h @@ -3,10 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __MODE_MODEL_SMP_H_ -#define __MODE_MODEL_SMP_H_ - +#pragma once #include #ifdef ENABLE_SMP_SUPPORT @@ -39,4 +36,3 @@ static inline BOOT_CODE void mode_init_tls(cpu_id_t cpu_index) #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODE_MODEL_SMP_H_ */ diff --git a/include/arch/x86/arch/32/mode/model/statedata.h b/include/arch/x86/arch/32/mode/model/statedata.h index 4c73d1164..b5956584e 100644 --- a/include/arch/x86/arch/32/mode/model/statedata.h +++ b/include/arch/x86/arch/32/mode/model/statedata.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_32_H -#define __ARCH_MODEL_STATEDATA_32_H +#pragma once + #include #include @@ -23,4 +23,3 @@ NODE_STATE_BEGIN(modeNodeState) NODE_STATE_DECLARE(paddr_t, ia32KSCurrentPD); NODE_STATE_END(modeNodeState); -#endif diff --git a/include/arch/x86/arch/32/mode/object/structures.h b/include/arch/x86/arch/32/mode/object/structures.h index b902da9e3..08701ab85 100644 --- a/include/arch/x86/arch/32/mode/object/structures.h +++ b/include/arch/x86/arch/32/mode/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_OBJECT_STRUCTURES_H -#define __MODE_OBJECT_STRUCTURES_H +#pragma once #include #include @@ -118,4 +117,3 @@ static inline void *CONST cap_get_modeCapPtr(cap_t cap) fail("Invalid mode cap type"); } -#endif diff --git a/include/arch/x86/arch/32/mode/smp/ipi.h b/include/arch/x86/arch/32/mode/smp/ipi.h index 6f307f0fc..42c4b515c 100644 --- a/include/arch/x86/arch/32/mode/smp/ipi.h +++ b/include/arch/x86/arch/32/mode/smp/ipi.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_IPI_H -#define __MODE_SMP_IPI_H - +#pragma once #include #include #include @@ -38,4 +36,4 @@ static void inline doRemoteInvalidateTLB(word_t mask) void Mode_handleRemoteCall(IpiModeRemoteCall_t call, word_t arg0, word_t arg1, word_t arg2); #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_SMP_IPI_H */ + diff --git a/include/arch/x86/arch/32/mode/stack.h b/include/arch/x86/arch/32/mode/stack.h index 42e7b8670..f6f9f3080 100644 --- a/include/arch/x86/arch/32/mode/stack.h +++ b/include/arch/x86/arch/32/mode/stack.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_STACK_H_ -#define __ARCH_MODE_STACK_H_ +#pragma once #include #include @@ -51,4 +50,3 @@ static inline void setKernelEntryStackPointer(tcb_t *target_thread) } } -#endif /* __ARCH_MODE_STACK_H_ */ diff --git a/include/arch/x86/arch/32/mode/types.h b/include/arch/x86/arch/32/mode/types.h index 1e18cc69c..916367669 100644 --- a/include/arch/x86/arch/32/mode/types.h +++ b/include/arch/x86/arch/32/mode/types.h @@ -4,10 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H_ -#define __ARCH_MODE_TYPES_H_ +#pragma once #define wordRadix 5 #define wordBits (1 << wordRadix) -#endif /* __ARCH_MODE_TYPES_H_ */ diff --git a/include/arch/x86/arch/64/mode/fastpath/fastpath.h b/include/arch/x86/arch/64/mode/fastpath/fastpath.h index 882339163..071a88169 100644 --- a/include/arch/x86/arch/64/mode/fastpath/fastpath.h +++ b/include/arch/x86/arch/64/mode/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_FASTPATH_FASTPATH_H_ -#define __ARCH_MODE_FASTPATH_FASTPATH_H_ +#pragma once #include #include @@ -262,4 +261,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m UNREACHABLE(); } -#endif /* __ARCH_MODE_FASTPATH_FASTPATH_H_ */ diff --git a/include/arch/x86/arch/64/mode/hardware.h b/include/arch/x86/arch/64/mode/hardware.h index 0fb8ac9e1..9e34e7812 100644 --- a/include/arch/x86/arch/64/mode/hardware.h +++ b/include/arch/x86/arch/64/mode/hardware.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_HARDWARE_32_H -#define __ARCH_HARDWARE_32_H +#pragma once #include #include #include -#endif /* __ARCH_HARDWARE_32_H */ diff --git a/include/arch/x86/arch/64/mode/kernel/elf.h b/include/arch/x86/arch/64/mode/kernel/elf.h index ddafdc8dc..77519add8 100644 --- a/include/arch/x86/arch/64/mode/kernel/elf.h +++ b/include/arch/x86/arch/64/mode/kernel/elf.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_KERNEL_ELF_H_ -#define __ARCH_MODE_KERNEL_ELF_H_ +#pragma once #include @@ -38,4 +37,3 @@ typedef struct Elf64_Phdr { uint64_t p_align; } Elf64_Phdr_t, Elf_Phdr_t; -#endif /* __ARCH_MODE_KERNEL_ELF_H_ */ diff --git a/include/arch/x86/arch/64/mode/kernel/stack.h b/include/arch/x86/arch/64/mode/kernel/stack.h index ee2a75f36..00a716f07 100644 --- a/include/arch/x86/arch/64/mode/kernel/stack.h +++ b/include/arch/x86/arch/64/mode/kernel/stack.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_MODE_STACK_H -#define __KERNEL_MODE_STACK_H +#pragma once #include #include #define KERNEL_STACK_ALIGNMENT 16 -#endif /* __KERNEL_MODE_STACK_H */ diff --git a/include/arch/x86/arch/64/mode/kernel/tlb.h b/include/arch/x86/arch/64/mode/kernel/tlb.h index 6e8462123..ebab4fabf 100644 --- a/include/arch/x86/arch/64/mode/kernel/tlb.h +++ b/include/arch/x86/arch/64/mode/kernel/tlb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_KERNEL_TLB_H -#define __MODE_KERNEL_TLB_H +#pragma once #include #include @@ -39,4 +38,3 @@ static inline void invalidateASID(vspace_root_t *vspace, asid_t asid, word_t mas SMP_COND_STATEMENT(doRemoteInvalidateASID(vspace, asid, mask)); } -#endif /* __MODE_KERNEL_TLB_H */ diff --git a/include/arch/x86/arch/64/mode/kernel/vspace.h b/include/arch/x86/arch/64/mode/kernel/vspace.h index 8aa6e0f1f..413843e75 100644 --- a/include/arch/x86/arch/64/mode/kernel/vspace.h +++ b/include/arch/x86/arch/64/mode/kernel/vspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_KERNEL_VSPACE_H -#define __MODE_KERNEL_VSPACE_H +#pragma once #include @@ -63,4 +62,3 @@ static inline CONST pml4e_t x86_make_empty_root_mapping(void) ); } -#endif /* __MODE_KERNEL_VSPACE_H */ diff --git a/include/arch/x86/arch/64/mode/machine.h b/include/arch/x86/arch/64/mode/machine.h index e3d95b97f..20e4fb905 100644 --- a/include/arch/x86/arch/64/mode/machine.h +++ b/include/arch/x86/arch/64/mode/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_H_ -#define __ARCH_MODE_MACHINE_H_ +#pragma once #include #include @@ -335,4 +334,3 @@ static inline void x86_set_tls_segment_base(word_t tls_base) x86_write_fs_base(tls_base, SMP_TERNARY(getCurrentCPUIndex(), 0)); } -#endif /* __ARCH_MODE_MACHINE_H_ */ diff --git a/include/arch/x86/arch/64/mode/machine/cpu_registers.h b/include/arch/x86/arch/64/mode/machine/cpu_registers.h index ee7fa610a..df50ec6e5 100644 --- a/include/arch/x86/arch/64/mode/machine/cpu_registers.h +++ b/include/arch/x86/arch/64/mode/machine/cpu_registers.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_CPU_REGISTERS_H_ -#define __ARCH_MODE_MACHINE_CPU_REGISTERS_H_ +#pragma once static inline unsigned long read_cr3(void) { @@ -50,4 +49,3 @@ static inline void write_cr4(unsigned long val) asm volatile("movq %0, %%cr4" :: "r"(val), "m"(control_reg_order)); } -#endif /* __ARCH_MODE_MACHINE_CPU_REGISTERS_H_ */ diff --git a/include/arch/x86/arch/64/mode/machine/debug.h b/include/arch/x86/arch/64/mode/machine/debug.h index 96ff615c0..0f8577e15 100644 --- a/include/arch/x86/arch/64/mode/machine/debug.h +++ b/include/arch/x86/arch/64/mode/machine/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_DEBUG_H_ -#define __ARCH_MODE_MACHINE_DEBUG_H_ +#pragma once #include @@ -124,4 +123,3 @@ static inline void loadBreakpointState(tcb_t *source) } #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */ diff --git a/include/arch/x86/arch/64/mode/machine/registerset.h b/include/arch/x86/arch/64/mode/machine/registerset.h index 641c5dcaf..a84cdb495 100644 --- a/include/arch/x86/arch/64/mode/machine/registerset.h +++ b/include/arch/x86/arch/64/mode/machine/registerset.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MACHINE_REGISTERSET_H_ -#define __ARCH_MODE_MACHINE_REGISTERSET_H_ +#pragma once /* These are the indices of the registers in the * saved thread context. The values are determined @@ -144,4 +143,3 @@ extern const register_t gpRegisters[]; #define FPU_PADDING word_t padding[1]; -#endif /* __ARCH_MODE_MACHINE_REGISTERSET_H_ */ diff --git a/include/arch/x86/arch/64/mode/model/smp.h b/include/arch/x86/arch/64/mode/model/smp.h index 6e9c5ae14..76d6421ac 100644 --- a/include/arch/x86/arch/64/mode/model/smp.h +++ b/include/arch/x86/arch/64/mode/model/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_MODEL_SMP_H_ -#define __MODE_MODEL_SMP_H_ +#pragma once #include @@ -57,5 +56,3 @@ BOOT_CODE void mode_init_tls(cpu_id_t cpu_index); #endif /* ENABLE_SMP_SUPPORT */ - -#endif /* __MODE_MODEL_SMP_H_ */ diff --git a/include/arch/x86/arch/64/mode/model/statedata.h b/include/arch/x86/arch/64/mode/model/statedata.h index 16613a027..e5f4d8c72 100644 --- a/include/arch/x86/arch/64/mode/model/statedata.h +++ b/include/arch/x86/arch/64/mode/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_MODEL_STATEDATA_H_ -#define __ARCH_MODE_MODEL_STATEDATA_H_ +#pragma once #include #include @@ -50,4 +49,3 @@ NODE_STATE_END(modeNodeState); #define IRQ_STACK_SIZE 6 extern word_t x64KSIRQStack[CONFIG_MAX_NUM_NODES][IRQ_STACK_SIZE + 2] ALIGN(64) VISIBLE SKIM_BSS; -#endif /* __ARCH_MODE_MODEL_STATEDATA_H_ */ diff --git a/include/arch/x86/arch/64/mode/object/structures.h b/include/arch/x86/arch/64/mode/object/structures.h index c4217eb7e..52fc167c9 100644 --- a/include/arch/x86/arch/64/mode/object/structures.h +++ b/include/arch/x86/arch/64/mode/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_OBJECT_STRUCTURES_H_ -#define __ARCH_MODE_OBJECT_STRUCTURES_H_ +#pragma once #include /* x86-64 specific object types */ @@ -194,4 +193,3 @@ static inline void *CONST cap_get_modeCapPtr(cap_t cap) } } -#endif /* __ARCH_MODE_OBJECT_STRUCTURES_H_ */ diff --git a/include/arch/x86/arch/64/mode/smp/ipi.h b/include/arch/x86/arch/64/mode/smp/ipi.h index fe194a426..24ffc2a8f 100644 --- a/include/arch/x86/arch/64/mode/smp/ipi.h +++ b/include/arch/x86/arch/64/mode/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODE_SMP_IPI_H -#define __MODE_SMP_IPI_H +#pragma once #include #include @@ -33,4 +32,4 @@ static inline void doRemoteInvalidateASID(vspace_root_t *vspace, asid_t asid, wo } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_SMP_IPI_H */ + diff --git a/include/arch/x86/arch/64/mode/types.h b/include/arch/x86/arch/64/mode/types.h index 759d4ad58..a6f06c7a2 100644 --- a/include/arch/x86/arch/64/mode/types.h +++ b/include/arch/x86/arch/64/mode/types.h @@ -4,10 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODE_TYPES_H_ -#define __ARCH_MODE_TYPES_H_ +#pragma once #define wordRadix 6 #define wordBits (1 << wordRadix) -#endif /* __ARCH_MODE_TYPES_H_ */ diff --git a/include/arch/x86/arch/api/types.h b/include/arch/x86/arch/api/types.h index 202b63605..51d6d6325 100644 --- a/include/arch/x86/arch/api/types.h +++ b/include/arch/x86/arch/api/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_API_TYPES -#define __ARCH_API_TYPES +#pragma once #include #include @@ -21,5 +20,3 @@ enum asidConstants { #define asidMax (BIT(asidLowBits + asidHighBits) - 1) typedef word_t asid_t; - -#endif diff --git a/include/arch/x86/arch/benchmark.h b/include/arch/x86/arch/benchmark.h index 0b6071f2b..daaa42990 100644 --- a/include/arch/x86/arch/benchmark.h +++ b/include/arch/x86/arch/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef ARCH_BENCHMARK_H -#define ARCH_BENCHMARK_H +#pragma once #include #ifdef CONFIG_ENABLE_BENCHMARKS @@ -37,4 +36,4 @@ static inline void benchmark_arch_utilisation_reset(void) } #endif /* CONFIG_ENABLE_BENCHMARKS */ -#endif /* ARCH_BENCHMARK_H */ + diff --git a/include/arch/x86/arch/bootinfo.h b/include/arch/x86/arch/bootinfo.h index 9948c8adc..a10613dfd 100644 --- a/include/arch/x86/arch/bootinfo.h +++ b/include/arch/x86/arch/bootinfo.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_BOOTINFO_H -#define __ARCH_BOOTINFO_H +#pragma once #define MAX_NUM_FREEMEM_REG 16 @@ -20,4 +19,3 @@ */ #define MAX_NUM_RESV_REG (MAX_NUM_FREEMEM_REG + CONFIG_MAX_NUM_IOAPIC + MAX_NUM_DRHU + 2) -#endif diff --git a/include/arch/x86/arch/fastpath/fastpath.h b/include/arch/x86/arch/fastpath/fastpath.h index 45ca4c3d6..b31b991a7 100644 --- a/include/arch/x86/arch/fastpath/fastpath.h +++ b/include/arch/x86/arch/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_FASTPATH_H -#define __ARCH_FASTPATH_H +#pragma once #include @@ -28,5 +27,3 @@ void fastpath_reply_recv(word_t cptr, word_t r_msgInfo, word_t reply) void fastpath_reply_recv(word_t cptr, word_t r_msgInfo) #endif NORETURN; - -#endif diff --git a/include/arch/x86/arch/kernel/apic.h b/include/arch/x86/arch/kernel/apic.h index 016b4ea43..e24fdc6e7 100644 --- a/include/arch/x86/arch/kernel/apic.h +++ b/include/arch/x86/arch/kernel/apic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_APIC_H -#define __ARCH_KERNEL_APIC_H +#pragma once #include #include @@ -32,4 +31,4 @@ void apic_send_ipi_core(irq_t vector, cpu_id_t cpu_id); void apic_send_ipi_cluster(irq_t vector, word_t mda); #define ipi_send_target apic_send_ipi_core -#endif + diff --git a/include/arch/x86/arch/kernel/boot.h b/include/arch/x86/arch/kernel/boot.h index a01ffbeea..f5b9706b3 100644 --- a/include/arch/x86/arch/kernel/boot.h +++ b/include/arch/x86/arch/kernel/boot.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_BOOT_NODE_H -#define __ARCH_KERNEL_BOOT_NODE_H +#pragma once #include #include @@ -50,4 +49,3 @@ bool_t init_cpu( bool_t add_allocated_p_region(p_region_t reg); void init_allocated_p_regions(void); -#endif diff --git a/include/arch/x86/arch/kernel/boot_sys.h b/include/arch/x86/arch/kernel/boot_sys.h index c2650c166..dac433033 100644 --- a/include/arch/x86/arch/kernel/boot_sys.h +++ b/include/arch/x86/arch/kernel/boot_sys.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_BOOT_SYS_H -#define __ARCH_KERNEL_BOOT_SYS_H +#pragma once #include #include @@ -39,4 +38,3 @@ void boot_sys( void *multiboot ); -#endif diff --git a/include/arch/x86/arch/kernel/cmdline.h b/include/arch/x86/arch/kernel/cmdline.h index 660beeee7..bc2892aae 100644 --- a/include/arch/x86/arch/kernel/cmdline.h +++ b/include/arch/x86/arch/kernel/cmdline.h @@ -3,10 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __ARCH_KERNEL_CMDLINE_H -#define __ARCH_KERNEL_CMDLINE_H - +#pragma once #include typedef struct cmdline_opt { @@ -21,4 +18,3 @@ typedef struct cmdline_opt { void cmdline_parse(const char *cmdline, cmdline_opt_t *cmdline_opt); -#endif diff --git a/include/arch/x86/arch/kernel/elf.h b/include/arch/x86/arch/kernel/elf.h index ae9fb58b9..3b0c4f083 100644 --- a/include/arch/x86/arch/kernel/elf.h +++ b/include/arch/x86/arch/kernel/elf.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_ELF_H_ -#define __ARCH_KERNEL_ELF_H_ +#pragma once #include #include @@ -15,4 +14,3 @@ bool_t elf_checkFile(Elf_Header_t *elfFile); v_region_t elf_getMemoryBounds(Elf_Header_t *elfFile); void elf_load(Elf_Header_t *elfFile, seL4_Word offset); -#endif /* __ARCH_KERNEL_ELF_H_ */ diff --git a/include/arch/x86/arch/kernel/ept.h b/include/arch/x86/arch/kernel/ept.h index f2e4910f4..a5d3ed1ee 100644 --- a/include/arch/x86/arch/kernel/ept.h +++ b/include/arch/x86/arch/kernel/ept.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_EPT_H -#define __ARCH_KERNEL_EPT_H +#pragma once #include #include @@ -61,4 +60,3 @@ void unmapEPTPage(vm_page_size_t page_size, asid_t asid, vptr_t vptr, void *pptr #endif /* CONFIG_VTX */ -#endif /* __ARCH_KERNEL_EPT_H */ diff --git a/include/arch/x86/arch/kernel/multiboot.h b/include/arch/x86/arch/kernel/multiboot.h index 7a1b3b5cc..445eed3cc 100644 --- a/include/arch/x86/arch/kernel/multiboot.h +++ b/include/arch/x86/arch/kernel/multiboot.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_MULTIBOOT_H -#define __ARCH_KERNEL_MULTIBOOT_H - +#pragma once /* Adapted from the MultiBoot Specification: */ /* www.gnu.org/software/grub/manual/multiboot */ @@ -72,4 +70,3 @@ typedef struct multiboot_info { #define MULTIBOOT_MMAP_ACPI_NVS_TYPE 4 #define MULTIBOOT_MMAP_BAD_TYPE 5 -#endif diff --git a/include/arch/x86/arch/kernel/multiboot2.h b/include/arch/x86/arch/kernel/multiboot2.h index babcbac53..e73292632 100644 --- a/include/arch/x86/arch/kernel/multiboot2.h +++ b/include/arch/x86/arch/kernel/multiboot2.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_MULTIBOOT2_H -#define __ARCH_KERNEL_MULTIBOOT2_H +#pragma once #define MULTIBOOT2_MAGIC 0x36d76289 @@ -53,4 +52,3 @@ enum multiboot2_tags { MULTIBOOT2_TAG_ACPI_2 = 15, }; -#endif diff --git a/include/arch/x86/arch/kernel/smp_sys.h b/include/arch/x86/arch/kernel/smp_sys.h index 4d6890970..e7bc30478 100644 --- a/include/arch/x86/arch/kernel/smp_sys.h +++ b/include/arch/x86/arch/kernel/smp_sys.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_SMP_SYS_H_ -#define __ARCH_KERNEL_SMP_SYS_H_ - +#pragma once /* Lower memory address to copy APs boot code in real mode. Actual memory starts at * 0x500 but we need to round up to a page aligned address in order to send the * startup IPI */ @@ -20,4 +18,3 @@ BOOT_CODE void start_boot_aps(void); BOOT_CODE bool_t copy_boot_code_aps(uint32_t mem_lower); #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_KERNEL_SMP_SYS_H_ */ diff --git a/include/arch/x86/arch/kernel/thread.h b/include/arch/x86/arch/kernel/thread.h index 81cf6bc1e..f0c74bf96 100644 --- a/include/arch/x86/arch/kernel/thread.h +++ b/include/arch/x86/arch/kernel/thread.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_THREAD_H -#define __ARCH_KERNEL_THREAD_H +#pragma once #include @@ -22,4 +21,4 @@ static inline bool_t CONST Arch_getSanitiseRegisterInfo(tcb_t *thread) void Mode_postModifyRegisters(tcb_t *tptr); -#endif + diff --git a/include/arch/x86/arch/kernel/tlb.h b/include/arch/x86/arch/kernel/tlb.h index c0e054b9a..957fb503a 100644 --- a/include/arch/x86/arch/kernel/tlb.h +++ b/include/arch/x86/arch/kernel/tlb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_TLB_H -#define __ARCH_KERNEL_TLB_H +#pragma once #include @@ -33,4 +32,4 @@ static inline void invalidateTranslationAll(word_t mask) SMP_COND_STATEMENT(doRemoteInvalidateTranslationAll(mask)); } -#endif /* __ARCH_KERNEL_TLB_H */ + diff --git a/include/arch/x86/arch/kernel/tlb_bitmap.h b/include/arch/x86/arch/kernel/tlb_bitmap.h index 12278f999..4f56b94cb 100644 --- a/include/arch/x86/arch/kernel/tlb_bitmap.h +++ b/include/arch/x86/arch/kernel/tlb_bitmap.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_TLB_BITMAP_H_ -#define __ARCH_KERNEL_TLB_BITMAP_H_ +#pragma once #include #include @@ -54,4 +53,3 @@ static inline word_t tlb_bitmap_get(vspace_root_t *root) #define TLBBITMAP_ROOT_ENTRIES 0 #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_KERNEL_TLB_BITMAP_H_ */ diff --git a/include/arch/x86/arch/kernel/tlb_bitmap_defs.h b/include/arch/x86/arch/kernel/tlb_bitmap_defs.h index 780b45486..7ef4351c6 100644 --- a/include/arch/x86/arch/kernel/tlb_bitmap_defs.h +++ b/include/arch/x86/arch/kernel/tlb_bitmap_defs.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_TLB_BITMAP_DEFS_H_ -#define __ARCH_KERNEL_TLB_BITMAP_DEFS_H_ +#pragma once #include @@ -28,4 +27,4 @@ #define TLBBITMAP_ROOT_ENTRIES 0 #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_KERNEL_TLB_BITMAP_DEFS_H_ */ + diff --git a/include/arch/x86/arch/kernel/traps.h b/include/arch/x86/arch/kernel/traps.h index 383a857bb..c53b73bf4 100644 --- a/include/arch/x86/arch/kernel/traps.h +++ b/include/arch/x86/arch/kernel/traps.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_X86_TRAPS_H -#define __KERNEL_X86_TRAPS_H +#pragma once #include #include @@ -43,5 +42,3 @@ VISIBLE NORETURN; void c_handle_vmexit(void) VISIBLE NORETURN; - -#endif /* __KERNEL_X86_TRAPS_H */ diff --git a/include/arch/x86/arch/kernel/vspace.h b/include/arch/x86/arch/kernel/vspace.h index 12d4cf798..041af1cac 100644 --- a/include/arch/x86/arch/kernel/vspace.h +++ b/include/arch/x86/arch/kernel/vspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_VSPACE_H -#define __ARCH_KERNEL_VSPACE_H +#pragma once #include #include @@ -138,4 +137,3 @@ static inline bool_t checkVPAlignment(vm_page_size_t sz, word_t w) return IS_ALIGNED(w, pageBitsForSize(sz)); } -#endif diff --git a/include/arch/x86/arch/kernel/x2apic.h b/include/arch/x86/arch/kernel/x2apic.h index b417eadbe..3d517c2e7 100644 --- a/include/arch/x86/arch/kernel/x2apic.h +++ b/include/arch/x86/arch/kernel/x2apic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_X2APIC_H_ -#define __ARCH_KERNEL_X2APIC_H_ +#pragma once #include #include @@ -69,4 +68,3 @@ static inline void apic_write_icr(word_t high, word_t low) #define IPI_ICR_BARRIER asm volatile("mfence" ::: "memory") #define IPI_MEM_BARRIER IPI_ICR_BARRIER #endif /* CONFIG_X2APIC */ -#endif /* __ARCH_KERNEL_X2APIC_H_ */ diff --git a/include/arch/x86/arch/kernel/xapic.h b/include/arch/x86/arch/kernel/xapic.h index 1fb9131c7..2be88896e 100644 --- a/include/arch/x86/arch/kernel/xapic.h +++ b/include/arch/x86/arch/kernel/xapic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_XAPIC_H_ -#define __ARCH_KERNEL_XAPIC_H_ +#pragma once #include #include @@ -70,4 +69,4 @@ static inline void apic_write_icr(word_t high, word_t low) #define IPI_ICR_BARRIER asm volatile("" ::: "memory") #define IPI_MEM_BARRIER IPI_ICR_BARRIER #endif /* CONFIG_XAPIC */ -#endif /* __ARCH_KERNEL_XAPIC_H_ */ + diff --git a/include/arch/x86/arch/linker.h b/include/arch/x86/arch/linker.h index 897dfe0c0..e1f687ae3 100644 --- a/include/arch/x86/arch/linker.h +++ b/include/arch/x86/arch/linker.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __ARCH_LINKER_H -#define __ARCH_LINKER_H +#pragma once #include @@ -18,4 +17,3 @@ /* bss data that is linked to physical addresses */ #define PHYS_BSS SECTION(".phys.bss") -#endif /* __ARCH_LINKER_H */ diff --git a/include/arch/x86/arch/machine.h b/include/arch/x86/arch/machine.h index 49ca7b43d..86d01619f 100644 --- a/include/arch/x86/arch/machine.h +++ b/include/arch/x86/arch/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_H -#define __ARCH_MACHINE_H +#pragma once #include #include @@ -976,4 +975,3 @@ void int_ff(void); void handle_vmexit(void); #endif -#endif diff --git a/include/arch/x86/arch/machine/capdl.h b/include/arch/x86/arch/machine/capdl.h index 847012f84..f3b8c96ee 100644 --- a/include/arch/x86/arch/machine/capdl.h +++ b/include/arch/x86/arch/machine/capdl.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_CAPDL_H -#define __ARCH_MACHINE_CAPDL_H +#pragma once void capDL(void); -#endif diff --git a/include/arch/x86/arch/machine/cpu_registers.h b/include/arch/x86/arch/machine/cpu_registers.h index acda55e06..ecacf483d 100644 --- a/include/arch/x86/arch/machine/cpu_registers.h +++ b/include/arch/x86/arch/machine/cpu_registers.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_CPU_REGISTERS_H -#define __ARCH_MACHINE_CPU_REGISTERS_H +#pragma once #define CR0_MONITOR_COPROC BIT(1) /* Trap on FPU "WAIT" commands. */ #define CR0_EMULATION BIT(2) /* Enable OS emulation of FPU. */ @@ -44,4 +43,3 @@ static inline void write_xcr0(uint64_t value) xsetbv(0, value); } -#endif diff --git a/include/arch/x86/arch/machine/debug.h b/include/arch/x86/arch/machine/debug.h index 3dc79c407..1d01b65f0 100644 --- a/include/arch/x86/arch/machine/debug.h +++ b/include/arch/x86/arch/machine/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_DEBUG_H_ -#define __ARCH_MACHINE_DEBUG_H_ +#pragma once #include #ifdef CONFIG_HARDWARE_DEBUG_API @@ -183,5 +182,3 @@ static inline syscall_error_t Arch_decodeUnsetBreakpoint(tcb_t *t, uint16_t bp_n } #endif /* CONFIG_HARDWARE_DEBUG_API */ - -#endif /* __ARCH_MACHINE_DEBUG_H_ */ diff --git a/include/arch/x86/arch/machine/fpu.h b/include/arch/x86/arch/machine/fpu.h index 92f22edaa..fb92c20b0 100644 --- a/include/arch/x86/arch/machine/fpu.h +++ b/include/arch/x86/arch/machine/fpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_FPU_H -#define __ARCH_MACHINE_FPU_H +#pragma once #include #include @@ -118,4 +117,4 @@ static inline bool_t vcpuThreadUsingFPU(tcb_t *thread) return thread->tcbArch.tcbVCPU && &thread->tcbArch.tcbVCPU->fpuState == NODE_STATE(ksActiveFPUState); } #endif /* CONFIG_VTX */ -#endif /* __ARCH_MACHINE_FPU_H */ + diff --git a/include/arch/x86/arch/machine/hardware.h b/include/arch/x86/arch/machine/hardware.h index 01850b45a..0859067f8 100644 --- a/include/arch/x86/arch/machine/hardware.h +++ b/include/arch/x86/arch/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_HARDWARE_H -#define __ARCH_MACHINE_HARDWARE_H +#pragma once #include #include @@ -122,5 +121,3 @@ static inline void arch_clean_invalidate_caches(void) /* Initialize Indirect Branch Restricted Speculation into the mode specified by the build configuration */ bool_t init_ibrs(void); - -#endif diff --git a/include/arch/x86/arch/machine/pat.h b/include/arch/x86/arch/machine/pat.h index 4f1f08c93..6cda95762 100644 --- a/include/arch/x86/arch/machine/pat.h +++ b/include/arch/x86/arch/machine/pat.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_PAT_H -#define __ARCH_MACHINE_PAT_H +#pragma once #define IA32_PAT_MSR 0x277 @@ -16,4 +15,3 @@ #define IA32_PAT_MT_WRITE_BACK 0x06 #define IA32_PAT_MT_UNCACHED 0x07 -#endif diff --git a/include/arch/x86/arch/machine/registerset.h b/include/arch/x86/arch/machine/registerset.h index ef4b2784d..f6c398bfe 100644 --- a/include/arch/x86/arch/machine/registerset.h +++ b/include/arch/x86/arch/machine/registerset.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_REGISTERSET_H -#define __ARCH_MACHINE_REGISTERSET_H +#pragma once #include #include @@ -90,4 +89,3 @@ unverified_compile_assert( ) #endif -#endif diff --git a/include/arch/x86/arch/machine/timer.h b/include/arch/x86/arch/machine/timer.h index 0be9202fa..333d2a922 100644 --- a/include/arch/x86/arch/machine/timer.h +++ b/include/arch/x86/arch/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MACHINE_TIMER_H -#define __ARCH_MACHINE_TIMER_H +#pragma once #include #include @@ -75,4 +74,3 @@ static inline void resetTimer(void) BOOT_CODE uint32_t tsc_init(void); -#endif /* __ARCH_MACHINE_TIMER_H */ diff --git a/include/arch/x86/arch/model/smp.h b/include/arch/x86/arch/model/smp.h index 2193c9a60..2c9a1b146 100644 --- a/include/arch/x86/arch/model/smp.h +++ b/include/arch/x86/arch/model/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_SMP_H_ -#define __ARCH_MODEL_SMP_H_ +#pragma once #include #include @@ -45,4 +44,3 @@ static inline bool_t try_arch_atomic_exchange(void *ptr, void *new_val, void **p } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_MODEL_SMP_H_ */ diff --git a/include/arch/x86/arch/model/statedata.h b/include/arch/x86/arch/model/statedata.h index 64b993927..cc59705e2 100644 --- a/include/arch/x86/arch/model/statedata.h +++ b/include/arch/x86/arch/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_MODEL_STATEDATA_H -#define __ARCH_MODEL_STATEDATA_H +#pragma once #include #include @@ -94,4 +93,3 @@ extern uint32_t x86KStscMhz; extern uint32_t x86KSapicRatio; #endif -#endif diff --git a/include/arch/x86/arch/object/interrupt.h b/include/arch/x86/arch/object/interrupt.h index f796c630a..74cc33f15 100644 --- a/include/arch/x86/arch/object/interrupt.h +++ b/include/arch/x86/arch/object/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_INTERRUPT_H -#define __ARCH_OBJECT_INTERRUPT_H +#pragma once #include #include @@ -18,4 +17,3 @@ exception_t Arch_decodeIRQControlInvocation(word_t invLabel, word_t length, void Arch_irqStateInit(void); exception_t Arch_checkIRQ(word_t irq_w); -#endif diff --git a/include/arch/x86/arch/object/ioport.h b/include/arch/x86/arch/object/ioport.h index d203ffc81..7df3c5a93 100644 --- a/include/arch/x86/arch/object/ioport.h +++ b/include/arch/x86/arch/object/ioport.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_IOPORT_H -#define __ARCH_OBJECT_IOPORT_H +#pragma once #include #include @@ -24,4 +23,3 @@ exception_t decodeX86PortControlInvocation(word_t invLabel, word_t length, cptr_ /* used to clean up the final capability to an allocated I/O port range */ void freeIOPortRange(uint16_t first_port, uint16_t last_port); -#endif diff --git a/include/arch/x86/arch/object/iospace.h b/include/arch/x86/arch/object/iospace.h index 507efdef0..1edf980f5 100644 --- a/include/arch/x86/arch/object/iospace.h +++ b/include/arch/x86/arch/object/iospace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_IOSPACE_H -#define __ARCH_OBJECT_IOSPACE_H +#pragma once #include @@ -46,4 +45,3 @@ void unmapVTDContextEntry(cap_t cap); #endif /* CONFIG_IOMMU */ -#endif diff --git a/include/arch/x86/arch/object/objecttype.h b/include/arch/x86/arch/object/objecttype.h index 6c2d721a0..e16195696 100644 --- a/include/arch/x86/arch/object/objecttype.h +++ b/include/arch/x86/arch/object/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_OBJECTTYPE_H -#define __ARCH_OBJECT_OBJECTTYPE_H +#pragma once #include #include @@ -38,4 +37,3 @@ word_t Mode_getObjectSize(word_t t); void Arch_postCapDeletion(cap_t cap); -#endif diff --git a/include/arch/x86/arch/object/structures.h b/include/arch/x86/arch/object/structures.h index 7367a9025..3c53277d6 100644 --- a/include/arch/x86/arch/object/structures.h +++ b/include/arch/x86/arch/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_STRUCTURES_H -#define __ARCH_OBJECT_STRUCTURES_H +#pragma once #include #include @@ -307,5 +306,3 @@ static inline bool_t CONST Arch_isCapRevocable(cap_t derivedCap, cap_t srcCap) return false; } } - -#endif /* __ARCH_OBJECT_STRUCTURES_H */ diff --git a/include/arch/x86/arch/object/tcb.h b/include/arch/x86/arch/object/tcb.h index e95b827ce..08d10e75f 100644 --- a/include/arch/x86/arch/object/tcb.h +++ b/include/arch/x86/arch/object/tcb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_TCB_H -#define __ARCH_OBJECT_TCB_H +#pragma once #include #include @@ -15,5 +14,3 @@ exception_t decodeSetEPTRoot(cap_t cap, extra_caps_t extraCaps); void Arch_leaveVMAsyncTransfer(tcb_t *tcb); #endif - -#endif diff --git a/include/arch/x86/arch/object/vcpu.h b/include/arch/x86/arch/object/vcpu.h index 26810d3dc..3438d3e81 100644 --- a/include/arch/x86/arch/object/vcpu.h +++ b/include/arch/x86/arch/object/vcpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECT_VCPU_H -#define __ARCH_OBJECT_VCPU_H +#pragma once #include #include @@ -379,5 +378,3 @@ static inline void vmwrite(word_t field, word_t value) #else /* CONFIG_VTX */ #define VTX_TERNARY(vtx, nonvtx) nonvtx #endif /* CONFIG_VTX */ - -#endif diff --git a/include/arch/x86/arch/smp/ipi.h b/include/arch/x86/arch/smp/ipi.h index 833ac55d9..eee60ee8b 100644 --- a/include/arch/x86/arch/smp/ipi.h +++ b/include/arch/x86/arch/smp/ipi.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_SMP_IPI_H -#define __ARCH_SMP_IPI_H - +#pragma once #include #ifdef ENABLE_SMP_SUPPORT @@ -25,4 +23,4 @@ typedef enum { } IpiRemoteCall_t; #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_SMP_IPI_H */ + diff --git a/include/arch/x86/arch/smp/ipi_inline.h b/include/arch/x86/arch/smp/ipi_inline.h index 3d09a7456..187c67051 100644 --- a/include/arch/x86/arch/smp/ipi_inline.h +++ b/include/arch/x86/arch/smp/ipi_inline.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_KERNEL_IPI_INLINE_H -#define __ARCH_KERNEL_IPI_INLINE_H +#pragma once #include #include @@ -54,4 +53,4 @@ static inline void doRemoteVMCheckBoundNotification(word_t cpu, tcb_t *tcb) #endif #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __ARCH_KERNEL_IPI_INLINE_H */ + diff --git a/include/arch/x86/arch/types.h b/include/arch/x86/arch/types.h index a14fc1673..9a5716a80 100644 --- a/include/arch/x86/arch/types.h +++ b/include/arch/x86/arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_TYPES_H -#define __ARCH_TYPES_H +#pragma once #include #include @@ -40,4 +39,4 @@ typedef paddr_t seL4_PAddr; typedef dom_t seL4_Domain; typedef uint64_t timestamp_t; -#endif + diff --git a/include/assert.h b/include/assert.h index cec30f957..4184c9216 100644 --- a/include/assert.h +++ b/include/assert.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASSERT_H -#define __ASSERT_H +#pragma once #include #include @@ -51,4 +50,3 @@ void _assert_fail( #define unverified_compile_assert compile_assert #endif -#endif diff --git a/include/basic_types.h b/include/basic_types.h index bdd34a032..c8d30cf08 100644 --- a/include/basic_types.h +++ b/include/basic_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __BASIC_TYPES_H -#define __BASIC_TYPES_H +#pragma once #include #include @@ -37,5 +36,3 @@ typedef struct v_region { /* equivalent to a word_t except that we tell the compiler that we may alias with * any other type (similar to a char pointer) */ typedef word_t __attribute__((__may_alias__)) word_t_may_alias; - -#endif /* __BASIC_TYPES_H */ diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index b2ed12caf..494888bfa 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef BENCHMARK_H -#define BENCHMARK_H +#pragma once #include #include @@ -62,4 +61,3 @@ static inline void trace_point_stop(word_t id) #endif /* CONFIG_MAX_NUM_TRACE_POINTS > 0 */ -#endif /* BENCHMARK_H */ diff --git a/include/benchmark/benchmark_track.h b/include/benchmark/benchmark_track.h index f1a2ff6ab..1147e768c 100644 --- a/include/benchmark/benchmark_track.h +++ b/include/benchmark/benchmark_track.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef BENCHMARK_TRACK_H -#define BENCHMARK_TRACK_H +#pragma once #include #include @@ -59,4 +58,3 @@ static inline void benchmark_debug_syscall_start(word_t cptr, word_t msgInfo, wo } #endif -#endif /* BENCHMARK_TRACK_H */ diff --git a/include/benchmark/benchmark_utilisation.h b/include/benchmark/benchmark_utilisation.h index 1f8bd67a5..cb4c20507 100644 --- a/include/benchmark/benchmark_utilisation.h +++ b/include/benchmark/benchmark_utilisation.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef BENCHMARK_UTILISATION_H -#define BENCHMARK_UTILISATION_H +#pragma once #include #include @@ -61,4 +60,3 @@ static inline void benchmark_utilisation_finalise(void) } #endif /* CONFIG_BENCHMARK_TRACK_UTILISATION */ -#endif /* BENCHMARK_UTILISATION_H */ diff --git a/include/benchmark/benchmark_utilisation_.h b/include/benchmark/benchmark_utilisation_.h index 3175a7f97..4a845fd60 100644 --- a/include/benchmark/benchmark_utilisation_.h +++ b/include/benchmark/benchmark_utilisation_.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _BENCHMARK_UTILISATION_H -#define _BENCHMARK_UTILISATION_H +#pragma once #include #include @@ -17,4 +16,3 @@ typedef struct { } benchmark_util_t; #endif /* CONFIG_BENCHMARK_TRACK_UTILISATION */ -#endif /* _BENCHMARK_UTILISATION_H */ diff --git a/include/bootinfo.h b/include/bootinfo.h index ca115b9f0..a42d3197c 100644 --- a/include/bootinfo.h +++ b/include/bootinfo.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __BOOTINFO_H -#define __BOOTINFO_H +#pragma once #include #include @@ -19,4 +18,3 @@ /* adjust constants in config.h if this assert fails */ compile_assert(bi_size, sizeof(seL4_BootInfo) <= BIT(BI_FRAME_SIZE_BITS)) -#endif diff --git a/include/compound_types.h b/include/compound_types.h index dfb91132f..ec2e6c29b 100644 --- a/include/compound_types.h +++ b/include/compound_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __COMPOUND_TYPES_H -#define __COMPOUND_TYPES_H +#pragma once #include #include @@ -31,4 +30,3 @@ struct extra_caps { }; typedef struct extra_caps extra_caps_t; -#endif /* __COMPOUND_TYPES_H */ diff --git a/include/config.h b/include/config.h index a378a85c1..bcf23247e 100644 --- a/include/config.h +++ b/include/config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __CONFIG_H -#define __CONFIG_H +#pragma once /* Compile-time configuration parameters. Might be set by the build system. */ @@ -105,4 +104,3 @@ #endif #endif -#endif /* __CONFIG_H */ diff --git a/include/drivers/irq/am335x.h b/include/drivers/irq/am335x.h index 9c41ff972..9354d1672 100644 --- a/include/drivers/irq/am335x.h +++ b/include/drivers/irq/am335x.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_IRQ_AM335X_H -#define __DRIVERS_IRQ_AM335X_H +#pragma once #include #include @@ -118,4 +117,4 @@ static inline void handleSpuriousIRQ(void) intc->intcps_control = INTCPS_CONTROL_NEWIRQAGR; dsb(); } -#endif /* __DRIVERS_IRQ_AM335X_H */ + diff --git a/include/drivers/irq/bcm2836-armctrl-ic.h b/include/drivers/irq/bcm2836-armctrl-ic.h index 104a99afa..2d87043e6 100644 --- a/include/drivers/irq/bcm2836-armctrl-ic.h +++ b/include/drivers/irq/bcm2836-armctrl-ic.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_IRQ_BCM_H -#define __DRIVERS_IRQ_BCM_H +#pragma once + #include #include #include @@ -143,4 +143,4 @@ static inline void handleSpuriousIRQ(void) /* Nothing to do here */ } -#endif /* !__DRIVERS_IRQ_BCM_H */ + diff --git a/include/drivers/irq/hifive.h b/include/drivers/irq/hifive.h index 515447dcd..67de83637 100644 --- a/include/drivers/irq/hifive.h +++ b/include/drivers/irq/hifive.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_IRQ_HIFIVE_H -#define __DRIVER_IRQ_HIFIVE_H +#pragma once #include #include @@ -177,4 +176,4 @@ static inline void plic_init_controller(void) } -#endif /* __DRIVER_IRQ_HIFIVE_H */ + diff --git a/include/drivers/irq/imx31.h b/include/drivers/irq/imx31.h index f1897eb75..68499e44f 100644 --- a/include/drivers/irq/imx31.h +++ b/include/drivers/irq/imx31.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_IRQ_IMX31_H -#define __DRIVER_IRQ_IMX31_H +#pragma once #include #include @@ -95,4 +94,3 @@ static inline void handleSpuriousIRQ(void) /* do nothing */ } -#endif diff --git a/include/drivers/irq/omap3.h b/include/drivers/irq/omap3.h index 497790f15..f95d965f2 100644 --- a/include/drivers/irq/omap3.h +++ b/include/drivers/irq/omap3.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_IRQ_OMAP3_H -#define __DRIVER_IRQ_OMAP3_H +#pragma once #include #include @@ -105,4 +104,3 @@ static inline void handleSpuriousIRQ(void) dsb(); } -#endif diff --git a/include/drivers/timer/allwinner.h b/include/drivers/timer/allwinner.h index e450b3051..6fd81b6ec 100644 --- a/include/drivers/timer/allwinner.h +++ b/include/drivers/timer/allwinner.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_TIMER_ALLWINNER_H -#define __DRIVER_TIMER_ALLWINNER_H +#pragma once #define TMR0_IRQ_PEND_FLAG BIT(0) @@ -25,4 +24,3 @@ static inline void resetTimer(void) timer->tmr_irq_sta_reg = TMR0_IRQ_PEND_FLAG; } -#endif /* !__DRIVER_TIMER_ALLWINNER_H */ diff --git a/include/drivers/timer/am335x.h b/include/drivers/timer/am335x.h index 0f5b5c99b..c806c2c72 100644 --- a/include/drivers/timer/am335x.h +++ b/include/drivers/timer/am335x.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_TIMER_AM335X_H -#define __DRIVER_TIMER_AM335X_H +#pragma once #define TISR_MATCH_FLAG BIT(0) #define TISR_OVF_FLAG BIT(1) @@ -90,4 +89,4 @@ static inline void resetTimer(void) ackInterrupt(KERNEL_TIMER_IRQ); } #endif /* !CONFIG_KERNEL_MCS */ -#endif /* __DRIVER_TIMER_AM335X_H */ + diff --git a/include/drivers/timer/arm_generic.h b/include/drivers/timer/arm_generic.h index 5534f206e..fb055f21b 100644 --- a/include/drivers/timer/arm_generic.h +++ b/include/drivers/timer/arm_generic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_ARM_GENERIC_H_ -#define __DRIVERS_TIMER_ARM_GENERIC_H_ +#pragma once #include #include @@ -51,4 +50,3 @@ static void save_virt_timer(vcpu_t *vcpu); static void restore_virt_timer(vcpu_t *vcpu); #endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */ -#endif /* __DRIVERS_TIMER_ARM_GENERIC_H_ */ diff --git a/include/drivers/timer/arm_global.h b/include/drivers/timer/arm_global.h index bf81d4f40..f5721a9c3 100644 --- a/include/drivers/timer/arm_global.h +++ b/include/drivers/timer/arm_global.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_ARM_GLOBAL_H -#define __DRIVERS_TIMER_ARM_GLOBAL_H +#pragma once #include #include @@ -84,4 +83,4 @@ static inline void ackDeadlineIRQ(void) globalTimer->isr = 1; } -#endif /* __DRIVERS_TIMER_ARM_GLOBAL_H */ + diff --git a/include/drivers/timer/arm_priv.h b/include/drivers/timer/arm_priv.h index 3fa2fd08f..5d7e8fc44 100644 --- a/include/drivers/timer/arm_priv.h +++ b/include/drivers/timer/arm_priv.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_ARM_PRIV_H_ -#define __DRIVERS_TIMER_ARM_PRIV_H_ +#pragma once #define TMR_INTS_EVENT BIT(0) @@ -24,4 +23,3 @@ static inline void resetTimer(void) priv_timer->ints = TMR_INTS_EVENT; } -#endif /* __DRIVERS_TIMER_ARM_PRIV_H_ */ diff --git a/include/drivers/timer/exynos4412-mct.h b/include/drivers/timer/exynos4412-mct.h index 666f85dd6..dddf8be00 100644 --- a/include/drivers/timer/exynos4412-mct.h +++ b/include/drivers/timer/exynos4412-mct.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_TIMER_MCT_EXYNOS4412_H -#define __DRIVER_TIMER_MCT_EXYNOS4412_H +#pragma once #include @@ -55,4 +54,4 @@ static inline void ackDeadlineIRQ(void) #endif -#endif /* !__DRIVER_TIMER_MCT_EXYNOS4412_H */ + diff --git a/include/drivers/timer/imx31-epit.h b/include/drivers/timer/imx31-epit.h index 80c266e30..5d35ee621 100644 --- a/include/drivers/timer/imx31-epit.h +++ b/include/drivers/timer/imx31-epit.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_IMX31_EPIT_H -#define __DRIVERS_TIMER_IMX31_EPIT_H +#pragma once /* Memory map for EPIT (Enhanced Periodic Interrupt Timer). */ struct timer { @@ -24,4 +23,4 @@ static inline void resetTimer(void) /* Timer resets automatically */ } -#endif /* !__DRIVERS_TIMER_IMX31_EPIT_H */ + diff --git a/include/drivers/timer/imx31-gpt.h b/include/drivers/timer/imx31-gpt.h index ad008078e..a8a02aa4a 100644 --- a/include/drivers/timer/imx31-gpt.h +++ b/include/drivers/timer/imx31-gpt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_IMX31_GPT_H -#define __DRIVERS_TIMER_IMX31_GPT_H +#pragma once #include @@ -63,4 +62,3 @@ static inline void ackDeadlineIRQ(void) gpt->gptsr |= (BIT(OF1IE) | BIT(ROV)); } -#endif /* !__DRIVERS_TIMER_IMX31_GPT_H */ diff --git a/include/drivers/timer/mct.h b/include/drivers/timer/mct.h index 9c3b26714..36dba3c51 100644 --- a/include/drivers/timer/mct.h +++ b/include/drivers/timer/mct.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVERS_TIMER_MCT_H -#define __DRIVERS_TIMER_MCT_H +#pragma once #include @@ -127,4 +126,3 @@ static inline void mct_clear_write_status(void) } -#endif /* __DRIVERS_TIMER_MCT_H */ diff --git a/include/drivers/timer/omap3430.h b/include/drivers/timer/omap3430.h index aea66884d..aa9b4dfbb 100644 --- a/include/drivers/timer/omap3430.h +++ b/include/drivers/timer/omap3430.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __DRIVER_TIMER_OMAP3_H -#define __DRIVER_TIMER_OMAP3_H +#pragma once #include @@ -74,4 +73,3 @@ static inline void resetTimer(void) ackInterrupt(KERNEL_TIMER_IRQ); } #endif /* !CONFIG_KERNEL_MCS */ -#endif /* !__DRIVER_TIMER_OMAP3_H */ diff --git a/include/fastpath/fastpath.h b/include/fastpath/fastpath.h index 1120e69a9..252c42f91 100644 --- a/include/fastpath/fastpath.h +++ b/include/fastpath/fastpath.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __FASTPATH_H -#define __FASTPATH_H +#pragma once /* Fastpath cap lookup. Returns a null_cap on failure. */ static inline cap_t FORCE_INLINE lookup_fp(cap_t cap, cptr_t cptr) @@ -117,4 +116,3 @@ static inline reply_t *thread_state_get_replyObject_np(thread_state_t ts) #include -#endif diff --git a/include/kernel/boot.h b/include/kernel/boot.h index 252b5c6d3..c829b5a6c 100644 --- a/include/kernel/boot.h +++ b/include/kernel/boot.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_BOOT_H -#define __KERNEL_BOOT_H - +#pragma once #include #include @@ -153,4 +151,3 @@ word_t arch_get_n_paging(v_region_t it_veg); /* Create pptrs for all root server objects, starting at pptr, to cover the * virtual memory region v_reg, and any extra boot info. */ void create_rootserver_objects(pptr_t start, v_region_t v_reg, word_t extra_bi_size_bits); -#endif diff --git a/include/kernel/cspace.h b/include/kernel/cspace.h index 513005042..b437dd5cf 100644 --- a/include/kernel/cspace.h +++ b/include/kernel/cspace.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_CSPACE_H -#define __KERNEL_CSPACE_H +#pragma once #include #include @@ -60,4 +59,3 @@ resolveAddressBits_ret_t resolveAddressBits(cap_t nodeCap, cptr_t capptr, word_t n_bits); -#endif diff --git a/include/kernel/faulthandler.h b/include/kernel/faulthandler.h index 500eee135..23d194ee7 100644 --- a/include/kernel/faulthandler.h +++ b/include/kernel/faulthandler.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_FAULTHANDLER_H -#define __KERNEL_FAULTHANDLER_H +#pragma once #include @@ -24,4 +23,3 @@ void handleDoubleFault(tcb_t *tptr, seL4_Fault_t ex1); #endif void handleFault(tcb_t *tptr); -#endif diff --git a/include/kernel/sporadic.h b/include/kernel/sporadic.h index 63fd47107..3f12e082a 100644 --- a/include/kernel/sporadic.h +++ b/include/kernel/sporadic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_SPORADIC_H -#define __KERNEL_SPORADIC_H +#pragma once /* This header presents the interface for sporadic servers, * implemented according to Stankcovich et. al in * "Defects of the POSIX Spoardic Server and How to correct them", @@ -138,4 +137,3 @@ void refill_split_check(ticks_t used); */ void refill_unblock_check(sched_context_t *sc); -#endif diff --git a/include/kernel/stack.h b/include/kernel/stack.h index dd10d6a96..5f268e08e 100644 --- a/include/kernel/stack.h +++ b/include/kernel/stack.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_STACK_H -#define __KERNEL_STACK_H +#pragma once #include #include @@ -18,4 +17,3 @@ */ extern char kernel_stack_alloc[CONFIG_MAX_NUM_NODES][BIT(CONFIG_KERNEL_STACK_BITS)]; -#endif /* __KERNEL_STACK_H */ diff --git a/include/kernel/thread.h b/include/kernel/thread.h index a6da340c5..72c1acb76 100644 --- a/include/kernel/thread.h +++ b/include/kernel/thread.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_THREAD_H -#define __KERNEL_THREAD_H +#pragma once #include #include @@ -265,4 +264,3 @@ void awaken(void); void postpone(sched_context_t *sc); #endif -#endif diff --git a/include/kernel/traps.h b/include/kernel/traps.h index 019b3c088..10795d875 100644 --- a/include/kernel/traps.h +++ b/include/kernel/traps.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __KERNEL_TRAPS_H -#define __KERNEL_TRAPS_H +#pragma once #include #include @@ -35,4 +34,3 @@ static inline void c_exit_hook(void) arch_c_exit_hook(); } -#endif /* __KERNEL_TRAPS_H */ diff --git a/include/kernel/vspace.h b/include/kernel/vspace.h index 21fb949a6..fea8ed666 100644 --- a/include/kernel/vspace.h +++ b/include/kernel/vspace.h @@ -3,9 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __KERNEL_VSPACE_H -#define __KERNEL_VSPACE_H +#pragma once #include #include @@ -14,4 +12,3 @@ exception_t benchmark_arch_map_logBuffer(word_t frame_cptr); #endif /* CONFIG_BENCHMARK_USE_KERNEL_LOG_BUFFER */ -#endif diff --git a/include/linker.h b/include/linker.h index 1d76792de..10781e48d 100644 --- a/include/linker.h +++ b/include/linker.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LINKER_H -#define __LINKER_H +#pragma once #include #include @@ -32,4 +31,4 @@ /* bss data that is permitted to be used in the restricted SKIM address space */ #define SKIM_BSS SECTION(".skim.bss") -#endif /* __LINKER_H */ + diff --git a/include/machine.h b/include/machine.h index 73c00d67e..8ae1484d0 100644 --- a/include/machine.h +++ b/include/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_H -#define __MACHINE_H +#pragma once #include #include @@ -40,4 +39,3 @@ static inline p_region_t CONST pptr_to_paddr_reg(region_t reg) #define paddr_to_pptr ptrFromPAddr #define pptr_to_paddr(x) addrFromPPtr(x) -#endif diff --git a/include/machine/assembler.h b/include/machine/assembler.h index 87c590538..8de03a4f8 100644 --- a/include/machine/assembler.h +++ b/include/machine/assembler.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_ASSEMBLER_H__ -#define __MACHINE_ASSEMBLER_H__ +#pragma once /* This file contains useful macros for assembly code. */ @@ -38,5 +37,5 @@ _name: #warning "Including assembly-specific header in C code" #endif -#endif /* __MACHINE_ASSEMBLER_H__ */ + diff --git a/include/machine/capdl.h b/include/machine/capdl.h index e12634acd..30a7c8705 100644 --- a/include/machine/capdl.h +++ b/include/machine/capdl.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_CAPDL_H -#define __MACHINE_CAPDL_H +#pragma once #define ESCAPE 0xaa #define START 0xff @@ -30,4 +29,3 @@ #define CAPDL_VERSION 0 -#endif diff --git a/include/machine/debug.h b/include/machine/debug.h index 8b3ab554d..fce3dcc09 100644 --- a/include/machine/debug.h +++ b/include/machine/debug.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_DEBUG_H_ -#define __MACHINE_DEBUG_H_ +#pragma once #include @@ -89,4 +88,3 @@ static inline bool_t singleStepFaultCounterReady(tcb_t *t) #endif /* CONFIG_HARDWARE_DEBUG_API */ -#endif /* __MACHINE_DEBUG_H_ */ diff --git a/include/machine/fpu.h b/include/machine/fpu.h index f2f343016..f05efe960 100644 --- a/include/machine/fpu.h +++ b/include/machine/fpu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_FPU_H -#define __MACHINE_FPU_H +#pragma once #include #include @@ -58,4 +57,4 @@ static inline void FORCE_INLINE lazyFPURestore(tcb_t *thread) } #endif /* CONFIG_HAVE_FPU */ -#endif /* __MACHINE_FPU_H */ + diff --git a/include/machine/interrupt.h b/include/machine/interrupt.h index 7d7b37221..4746ddb1a 100644 --- a/include/machine/interrupt.h +++ b/include/machine/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_INTERRUPT_H -#define __MACHINE_INTERRUPT_H +#pragma once #include @@ -117,4 +116,3 @@ static inline void handleSpuriousIRQ(void); */ static inline void handleReservedIRQ(irq_t irq); -#endif /* __MACHINE_INTERRUPT_H */ diff --git a/include/machine/io.h b/include/machine/io.h index 108250448..3e306e9ae 100644 --- a/include/machine/io.h +++ b/include/machine/io.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_IO_H_ -#define __MACHINE_IO_H_ +#pragma once #include #include @@ -37,5 +36,3 @@ word_t print_unsigned_long(unsigned long x, word_t ui_base) VISIBLE; #define printf(args...) ((void)(0)) #define puts(s) ((void)(0)) #endif /* CONFIG_PRINTING */ - -#endif /* __MACHINE_IO_H_ */ diff --git a/include/machine/profiler.h b/include/machine/profiler.h index 790e1e853..5c8472b64 100644 --- a/include/machine/profiler.h +++ b/include/machine/profiler.h @@ -11,8 +11,7 @@ * 2007 Ported to seL4 C kernel by Philip Derrin */ -#ifndef __MACHINE__PROFILER_H__ -#define __MACHINE__PROFILER_H__ +#pragma once #include #include @@ -75,5 +74,4 @@ extern profiler_entry_t profiler_entries[MAX_UNIQUE_INSTRUCTIONS]; #endif /* PROFILER */ -#endif /* !__MACHINE__PROFILER_H__ */ diff --git a/include/machine/registerset.h b/include/machine/registerset.h index 5f45bb36b..676f0d08e 100644 --- a/include/machine/registerset.h +++ b/include/machine/registerset.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_REGISTERSET_H -#define __MACHINE_REGISTERSET_H +#pragma once #include #include @@ -41,4 +40,3 @@ static inline word_t PURE getRegister(tcb_t *thread, register_t reg) word_t getNBSendRecvDest(void); #endif -#endif diff --git a/include/machine/timer.h b/include/machine/timer.h index 3fc50fd28..047534fe8 100644 --- a/include/machine/timer.h +++ b/include/machine/timer.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MACHINE_TIMER_H -#define __MACHINE_TIMER_H +#pragma once #include #include @@ -32,4 +31,4 @@ static PURE inline ticks_t getKernelWcetTicks(void) #else /* CONFIG_KERNEL_MCS */ static inline void resetTimer(void); #endif /* !CONFIG_KERNEL_MCS */ -#endif /* __MACHINE_TIMER_H */ + diff --git a/include/model/preemption.h b/include/model/preemption.h index 7b49f0632..8dfc13e4c 100644 --- a/include/model/preemption.h +++ b/include/model/preemption.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODEL_PREEMPTION_H -#define __MODEL_PREEMPTION_H +#pragma once #include exception_t preemptionPoint(void); -#endif diff --git a/include/model/smp.h b/include/model/smp.h index 61dba9c55..7b9426c6a 100644 --- a/include/model/smp.h +++ b/include/model/smp.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODEL_SMP_H_ -#define __MODEL_SMP_H_ +#pragma once #include #include @@ -26,4 +25,3 @@ void migrateTCB(tcb_t *tcb, word_t new_core); #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __MODEL_SMP_H_ */ diff --git a/include/model/statedata.h b/include/model/statedata.h index 4082df1bc..a242d853e 100644 --- a/include/model/statedata.h +++ b/include/model/statedata.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __MODEL_STATEDATA_H_ -#define __MODEL_STATEDATA_H_ +#pragma once #include #include @@ -123,4 +122,3 @@ extern paddr_t ksUserLogBuffer; #define ARCH_NODE_STATE(_state) ARCH_NODE_STATE_ON_CORE(_state, getCurrentCPUIndex()) #define NODE_STATE(_state) NODE_STATE_ON_CORE(_state, getCurrentCPUIndex()) -#endif /* __MODEL_STATEDATA_H_ */ diff --git a/include/object.h b/include/object.h index cbc2a9b76..49f7ddddb 100644 --- a/include/object.h +++ b/include/object.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_H -#define __OBJECT_H +#pragma once #include #include @@ -18,4 +17,3 @@ #include #include -#endif diff --git a/include/object/cap.h b/include/object/cap.h index 540db63ae..9ee5405c8 100644 --- a/include/object/cap.h +++ b/include/object/cap.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_CAP_H -#define __OBJECT_CAP_H +#pragma once struct deriveCap_ret { exception_t status; @@ -21,4 +20,3 @@ struct finaliseCap_ret { }; typedef struct finaliseCap_ret finaliseCap_ret_t; -#endif diff --git a/include/object/cnode.h b/include/object/cnode.h index c26a5ba33..4c4f14f60 100644 --- a/include/object/cnode.h +++ b/include/object/cnode.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_CNODE_H -#define __OBJECT_CNODE_H +#pragma once #include #include @@ -48,4 +47,4 @@ cap_transfer_t PURE loadCapTransfer(word_t *buffer); exception_t invokeCNodeSaveCaller(cte_t *destSlot); void setupReplyMaster(tcb_t *thread); #endif -#endif + diff --git a/include/object/endpoint.h b/include/object/endpoint.h index 5cdb9c368..4020224c0 100644 --- a/include/object/endpoint.h +++ b/include/object/endpoint.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_ENDPOINT_H -#define __OBJECT_ENDPOINT_H +#pragma once #include #include @@ -38,4 +37,3 @@ void cancelBadgedSends(endpoint_t *epptr, word_t badge); void replyFromKernel_error(tcb_t *thread); void replyFromKernel_success_empty(tcb_t *thread); -#endif diff --git a/include/object/interrupt.h b/include/object/interrupt.h index d1b9c2f05..c52c90d85 100644 --- a/include/object/interrupt.h +++ b/include/object/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_INTERRUPT_H -#define __OBJECT_INTERRUPT_H +#pragma once #include #include @@ -28,4 +27,3 @@ void handleInterrupt(irq_t irq); bool_t isIRQActive(irq_t irq); void setIRQState(irq_state_t irqState, irq_t irq); -#endif diff --git a/include/object/notification.h b/include/object/notification.h index d08b0d804..642db7e31 100644 --- a/include/object/notification.h +++ b/include/object/notification.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_NOTIFICATION_H -#define __OBJECT_NOTIFICATION_H +#pragma once #include #include @@ -22,4 +21,4 @@ void bindNotification(tcb_t *tcb, notification_t *ntfnPtr); void reorderNTFN(notification_t *notification, tcb_t *thread); #endif -#endif + diff --git a/include/object/objecttype.h b/include/object/objecttype.h index a4b1854ab..6fe0c1255 100644 --- a/include/object/objecttype.h +++ b/include/object/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_OBJECTTYPE_H -#define __OBJECT_OBJECTTYPE_H +#pragma once #include #include @@ -61,4 +60,3 @@ static inline void postCapDeletion(cap_t cap) } } -#endif diff --git a/include/object/reply.h b/include/object/reply.h index cc4f395f9..81d6d79ed 100644 --- a/include/object/reply.h +++ b/include/object/reply.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_REPLY_H -#define __OBJECT_REPLY_H +#pragma once #include #include @@ -32,4 +31,3 @@ void reply_remove(reply_t *reply); /* Remove a specific tcb, and the reply it is blocking on, from the call stack */ void reply_remove_tcb(tcb_t *tcb); -#endif /* __OBJECT_REPLY_H */ diff --git a/include/object/schedcontext.h b/include/object/schedcontext.h index b52c7e2aa..4132569fe 100644 --- a/include/object/schedcontext.h +++ b/include/object/schedcontext.h @@ -3,9 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __OBJECT_SCHED_CONTEXT_H -#define __OBJECT_SCHED_CONTEXT_H +#pragma once #include #include @@ -72,4 +70,3 @@ time_t schedContext_updateConsumed(sched_context_t *sc); void schedContext_completeYieldTo(tcb_t *yielder); void schedContext_cancelYieldTo(tcb_t *yielder); -#endif /* __OBJECT_SCHED_CONTEXT_H */ diff --git a/include/object/schedcontrol.h b/include/object/schedcontrol.h index 2d2c2b5a8..1f5856bc0 100644 --- a/include/object/schedcontrol.h +++ b/include/object/schedcontrol.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_SCHED_CONTROL_H -#define __OBJECT_SCHED_CONTROL_H +#pragma once #include #include @@ -14,4 +13,3 @@ exception_t decodeSchedControlInvocation(word_t label, cap_t cap, word_t length, extra_caps_t extra_caps, word_t *buffer); -#endif /* __OBJECT_SCHED_CONTROL_H */ diff --git a/include/object/structures.h b/include/object/structures.h index 3baa052a7..71caafd9c 100644 --- a/include/object/structures.h +++ b/include/object/structures.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_STRUCTURES_H -#define __OBJECT_STRUCTURES_H +#pragma once #include #include @@ -602,4 +601,3 @@ static inline bool_t CONST isCapRevocable(cap_t derivedCap, cap_t srcCap) } } -#endif diff --git a/include/object/tcb.h b/include/object/tcb.h index e5c78b989..7549c7b90 100644 --- a/include/object/tcb.h +++ b/include/object/tcb.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_TCB_H -#define __OBJECT_TCB_H +#pragma once #include #include @@ -214,4 +213,3 @@ void Arch_migrateTCB(tcb_t *thread); void setThreadName(tcb_t *thread, const char *name); #endif /* CONFIG_DEBUG_BUILD */ -#endif diff --git a/include/object/untyped.h b/include/object/untyped.h index 2333dbdd0..08defbc69 100644 --- a/include/object/untyped.h +++ b/include/object/untyped.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OBJECT_UNTYPED_H -#define __OBJECT_UNTYPED_H +#pragma once #include #include @@ -36,4 +35,3 @@ exception_t invokeUntyped_Retype(cte_t *srcSlot, bool_t reset, void *retypeBase, object_t newType, word_t userSize, slot_range_t destSlots, bool_t deviceMemory); -#endif diff --git a/include/plat/default/plat/machine/hardware.h b/include/plat/default/plat/machine/hardware.h index dc5e8dfb3..fed33e069 100644 --- a/include/plat/default/plat/machine/hardware.h +++ b/include/plat/default/plat/machine/hardware.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_HARDWARE_H -#define __PLAT_MACHINE_HARDWARE_H +#pragma once #include #include #include #include #include -#endif /* !__PLAT_MACHINE_HARDWARE_H */ diff --git a/include/plat/pc99/plat/32/plat_mode/machine/hardware.h b/include/plat/pc99/plat/32/plat_mode/machine/hardware.h index a05060996..57716ee0f 100644 --- a/include/plat/pc99/plat/32/plat_mode/machine/hardware.h +++ b/include/plat/pc99/plat/32/plat_mode/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MODE_MACHINE_HARDWARE_H -#define __PLAT_MODE_MACHINE_HARDWARE_H +#pragma once #include #include @@ -56,4 +55,3 @@ #define paddr_to_kpptr(x) paddr_to_pptr(x) #define kpptr_to_paddr(x) pptr_to_paddr(x) -#endif diff --git a/include/plat/pc99/plat/64/plat_mode/machine/hardware.h b/include/plat/pc99/plat/64/plat_mode/machine/hardware.h index 2ea9819fa..4bccdbc7c 100644 --- a/include/plat/pc99/plat/64/plat_mode/machine/hardware.h +++ b/include/plat/pc99/plat/64/plat_mode/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MODE_MACHINE_HARDWARE_H_ -#define __PLAT_MODE_MACHINE_HARDWARE_H_ +#pragma once #include @@ -91,4 +90,3 @@ static inline paddr_t CONST kpptr_to_paddr(void *pptr) #endif /* __ASSEMBLER__ */ -#endif /* __PLAT_MODE_MACHINE_HARDWARE_H_ */ diff --git a/include/plat/pc99/plat/machine.h b/include/plat/pc99/plat/machine.h index 974d8e214..7a2d09b1a 100644 --- a/include/plat/pc99/plat/machine.h +++ b/include/plat/pc99/plat/machine.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_H -#define __PLAT_MACHINE_H +#pragma once #include @@ -75,4 +74,3 @@ typedef enum _platform_irq_t { #define BIOS_PADDR_VIDEO_RAM_TEXT_MODE_START 0x000B8000 #define BIOS_PADDR_IVDEO_RAM_END 0x000C0000 -#endif diff --git a/include/plat/pc99/plat/machine/acpi.h b/include/plat/pc99/plat/machine/acpi.h index d118f69db..2c7d20807 100644 --- a/include/plat/pc99/plat/machine/acpi.h +++ b/include/plat/pc99/plat/machine/acpi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_ACPI_H -#define __PLAT_MACHINE_ACPI_H +#pragma once #include #include @@ -85,5 +84,3 @@ void acpi_dmar_scan( bool_t acpi_fadt_scan( acpi_rsdp_t *acpi_rsdp ); - -#endif diff --git a/include/plat/pc99/plat/machine/devices.h b/include/plat/pc99/plat/machine/devices.h index 87a9e6d62..8e4f61cf2 100644 --- a/include/plat/pc99/plat/machine/devices.h +++ b/include/plat/pc99/plat/machine/devices.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_DEVICES_H -#define __PLAT_MACHINE_DEVICES_H +#pragma once #include @@ -16,4 +15,3 @@ #define MAX_NUM_DRHU ((-PPTR_DRHU_START) >> PAGE_BITS) -#endif diff --git a/include/plat/pc99/plat/machine/hardware.h b/include/plat/pc99/plat/machine/hardware.h index 50d8030df..ab8c35921 100644 --- a/include/plat/pc99/plat/machine/hardware.h +++ b/include/plat/pc99/plat/machine/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_HARDWARE_H -#define __PLAT_MACHINE_HARDWARE_H +#pragma once #include #include @@ -14,4 +13,4 @@ bool_t platAddDevices(void); -#endif + diff --git a/include/plat/pc99/plat/machine/intel-vtd.h b/include/plat/pc99/plat/machine/intel-vtd.h index 86524e083..efe4ef828 100644 --- a/include/plat/pc99/plat/machine/intel-vtd.h +++ b/include/plat/pc99/plat/machine/intel-vtd.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_INTEL_VTD_H -#define __PLAT_MACHINE_INTEL_VTD_H +#pragma once #include @@ -21,5 +20,3 @@ bool_t vtd_init_num_iopts(uint32_t num_drhu); bool_t vtd_init(cpu_id_t cpu_id, acpi_rmrr_list_t *rmrr_list); #endif /* CONFIG_IOMMU */ - -#endif diff --git a/include/plat/pc99/plat/machine/interrupt.h b/include/plat/pc99/plat/machine/interrupt.h index e76f4a2e0..b30fc8fa5 100644 --- a/include/plat/pc99/plat/machine/interrupt.h +++ b/include/plat/pc99/plat/machine/interrupt.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_INTERRUPT_H -#define __PLAT_MACHINE_INTERRUPT_H +#pragma once #include #include @@ -145,4 +144,3 @@ static inline void maskInterrupt(bool_t disable, irq_t irq) } } -#endif diff --git a/include/plat/pc99/plat/machine/io.h b/include/plat/pc99/plat/machine/io.h index 82bd4cd48..bc6e8cd09 100644 --- a/include/plat/pc99/plat/machine/io.h +++ b/include/plat/pc99/plat/machine/io.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_IO_H_ -#define __PLAT_MACHINE_IO_H_ +#pragma once #include #include @@ -28,4 +27,3 @@ uint32_t in32(uint16_t port); void serial_init(uint16_t port); #endif -#endif /* __PLAT_MACHINE_IO_H_ */ diff --git a/include/plat/pc99/plat/machine/ioapic.h b/include/plat/pc99/plat/machine/ioapic.h index 2d38dffe5..b89017192 100644 --- a/include/plat/pc99/plat/machine/ioapic.h +++ b/include/plat/pc99/plat/machine/ioapic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_IOAPIC_H -#define __PLAT_MACHINE_IOAPIC_H +#pragma once #include #include @@ -20,4 +19,4 @@ exception_t ioapic_decode_map_pin_to_vector(word_t ioapic, word_t pin, word_t le /* The function maps a pin to an interrupt vector, does not perform * any checks, use ioapic_decode_map_pin_to_vector first */ void ioapic_map_pin_to_vector(word_t ioapic, word_t pin, word_t level, word_t polarity, word_t vector); -#endif + diff --git a/include/plat/pc99/plat/machine/pci.h b/include/plat/pc99/plat/machine/pci.h index 414d9b8ed..7e0e62ce5 100644 --- a/include/plat/pc99/plat/machine/pci.h +++ b/include/plat/pc99/plat/machine/pci.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_PCI_H -#define __PLAT_MACHINE_PCI_H +#pragma once #define get_pci_bus(x) (((x)>>8u) & 0xffu) #define get_pci_dev(x) (((x)>>3u) & 0x1fu) @@ -16,4 +15,4 @@ #define PCI_DEV_MAX 31 #define PCI_FUNC_MAX 7 -#endif + diff --git a/include/plat/pc99/plat/machine/pic.h b/include/plat/pc99/plat/machine/pic.h index 4e8b37ab4..76d7f2200 100644 --- a/include/plat/pc99/plat/machine/pic.h +++ b/include/plat/pc99/plat/machine/pic.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_PIC_H -#define __PLAT_MACHINE_PIC_H +#pragma once #include #include @@ -19,4 +18,3 @@ void pic_mask_irq(bool_t mask, irq_t irq); bool_t pic_is_irq_pending(void); void pic_ack_active_irq(void); -#endif diff --git a/include/plat/pc99/plat/machine/pit.h b/include/plat/pc99/plat/machine/pit.h index 2ed1a0173..4f0cda844 100644 --- a/include/plat/pc99/plat/machine/pit.h +++ b/include/plat/pc99/plat/machine/pit.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_MACHINE_PIT_H -#define __PLAT_MACHINE_PIT_H +#pragma once /* ms after which a wraparound occurs (max. 54) */ #define PIT_WRAPAROUND_MS 50 @@ -13,4 +12,3 @@ void pit_init(void); void pit_wait_wraparound(void); -#endif diff --git a/include/plat/spike/plat/instance/rocket-chip/hardware.h b/include/plat/spike/plat/instance/rocket-chip/hardware.h index 4e3bd169e..7af369118 100644 --- a/include/plat/spike/plat/instance/rocket-chip/hardware.h +++ b/include/plat/spike/plat/instance/rocket-chip/hardware.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_INSTANCE_HARDWARE_H -#define __PLAT_INSTANCE_HARDWARE_H +#pragma once #define PLIC_MAX_NUM_INT 0 #define IRQ_CNODE_SLOT_BITS 1 @@ -38,4 +37,3 @@ static p_region_t BOOT_DATA avail_p_regs[] = { static const paddr_t BOOT_RODATA *kernel_devices = NULL; static const p_region_t BOOT_RODATA *dev_p_regs = NULL; -#endif diff --git a/include/plat/tk1/plat/machine/smmu.h b/include/plat/tk1/plat/machine/smmu.h index 875b627b5..9cea3f0e8 100644 --- a/include/plat/tk1/plat/machine/smmu.h +++ b/include/plat/tk1/plat/machine/smmu.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __PLAT_SMMU_H -#define __PLAT_SMMU_H +#pragma once #include @@ -168,4 +167,3 @@ static inline void plat_smmu_handle_interrupt(void) #endif /* CONFIG_ARM_SMMU */ -#endif /* __PLAT_SMMU_H */ diff --git a/include/smp/ipi.h b/include/smp/ipi.h index 1f2845923..b0992874d 100644 --- a/include/smp/ipi.h +++ b/include/smp/ipi.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __IPI_H -#define __IPI_H +#pragma once #include #include @@ -170,4 +169,4 @@ static void inline doReschedule(word_t cpu) } #endif /* ENABLE_SMP_SUPPORT */ -#endif /* __IPI_H */ + diff --git a/include/smp/lock.h b/include/smp/lock.h index 1fa7d51fb..6c3959d4d 100644 --- a/include/smp/lock.h +++ b/include/smp/lock.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __SMP_LOCK_H_ -#define __SMP_LOCK_H_ +#pragma once #include #include @@ -155,4 +154,4 @@ static inline bool_t FORCE_INLINE clh_is_self_in_queue(void) #define NODE_LOCK_IRQ NODE_LOCK(true) #define NODE_LOCK_SYS_IF(_cond) NODE_LOCK_IF(_cond, false) #define NODE_LOCK_IRQ_IF(_cond) NODE_LOCK_IF(_cond, true) -#endif /* __SMP_LOCK_H_ */ + diff --git a/include/stdarg.h b/include/stdarg.h index 70487ac43..11aeb60cc 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __STDARG_H -#define __STDARG_H +#pragma once #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) typedef __builtin_va_list va_list; -#endif diff --git a/include/stdint.h b/include/stdint.h index cffbe71da..92ea8c9e4 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __STDINT_H -#define __STDINT_H +#pragma once #include @@ -24,4 +23,3 @@ typedef signed long long int64_t; #define INT64_MAX (0x7FFFFFFFFFFFFFFF) #define INT32_MAX (0x7FFFFFFF) -#endif diff --git a/include/string.h b/include/string.h index 3fd282f1e..3a222b327 100644 --- a/include/string.h +++ b/include/string.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __STRING_H -#define __STRING_H +#pragma once #include @@ -13,4 +12,3 @@ word_t strnlen(const char *s, word_t maxlen); word_t strlcpy(char *dest, const char *src, word_t size); word_t strlcat(char *dest, const char *src, word_t size); -#endif diff --git a/include/types.h b/include/types.h index 53c645bfb..b69b8160f 100644 --- a/include/types.h +++ b/include/types.h @@ -4,10 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __TYPES_H -#define __TYPES_H +#pragma once #include #include -#endif diff --git a/include/util.h b/include/util.h index 76c6a5a54..1da4008da 100644 --- a/include/util.h +++ b/include/util.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __UTIL_H -#define __UTIL_H +#pragma once #define MASK(n) (BIT(n)-1ul) #define IS_ALIGNED(n, b) (!((n) & MASK(b))) @@ -181,4 +180,4 @@ CONST popcountl(unsigned long mask) #define UL_CONST(x) x #endif /* !__ASSEMBLER__ */ -#endif /* __UTIL_H */ + diff --git a/libsel4/arch_include/arm/sel4/arch/constants.h b/libsel4/arch_include/arm/sel4/arch/constants.h index 08265e3b3..d55215b5d 100644 --- a/libsel4/arch_include/arm/sel4/arch/constants.h +++ b/libsel4/arch_include/arm/sel4/arch/constants.h @@ -4,7 +4,5 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_ARCH_CONSTANTS_H +#pragma once -#endif diff --git a/libsel4/arch_include/arm/sel4/arch/deprecated.h b/libsel4/arch_include/arm/sel4/arch/deprecated.h index c205fb503..8d002f9e2 100644 --- a/libsel4/arch_include/arm/sel4/arch/deprecated.h +++ b/libsel4/arch_include/arm/sel4/arch/deprecated.h @@ -4,11 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SEL4_DEPRECATED_H -#define __LIBSEL4_ARCH_SEL4_DEPRECATED_H +#pragma once #include #include #include -#endif /* __ARCH_SEL4_DEPRECATED_H__ */ + diff --git a/libsel4/arch_include/arm/sel4/arch/mapping.h b/libsel4/arch_include/arm/sel4/arch/mapping.h index b752cc28c..a7bbb33de 100644 --- a/libsel4/arch_include/arm/sel4/arch/mapping.h +++ b/libsel4/arch_include/arm/sel4/arch/mapping.h @@ -4,9 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_MAPPING -#define __LIBSEL4_ARCH_MAPPING +#pragma once #include -#endif + diff --git a/libsel4/arch_include/arm/sel4/arch/objecttype.h b/libsel4/arch_include/arm/sel4/arch/objecttype.h index 99c0e19e4..1523e58f3 100644 --- a/libsel4/arch_include/arm/sel4/arch/objecttype.h +++ b/libsel4/arch_include/arm/sel4/arch/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __ARCH_OBJECTTYPE_H -#define __ARCH_OBJECTTYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -39,5 +38,4 @@ typedef seL4_Word object_t; #define seL4_ARM_IOPageTableObject 0xffff #endif -#endif /* __ARCH_OBJECTTYPE_H */ diff --git a/libsel4/arch_include/arm/sel4/arch/shared_types.h b/libsel4/arch_include/arm/sel4/arch/shared_types.h index 73aea079c..4b5606997 100644 --- a/libsel4/arch_include/arm/sel4/arch/shared_types.h +++ b/libsel4/arch_include/arm/sel4/arch/shared_types.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SHARED_TYPES_H -#define __LIBSEL4_ARCH_SHARED_TYPES_H +#pragma once #include #include #include -#endif diff --git a/libsel4/arch_include/arm/sel4/arch/simple_types.h b/libsel4/arch_include/arm/sel4/arch/simple_types.h index 64b261f82..47881ca7b 100644 --- a/libsel4/arch_include/arm/sel4/arch/simple_types.h +++ b/libsel4/arch_include/arm/sel4/arch/simple_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_ARCH_SIMPLE_TYPES_H_ +#pragma once #include @@ -17,4 +16,3 @@ typedef unsigned char seL4_Uint8; typedef unsigned short seL4_Uint16; typedef unsigned int seL4_Uint32; -#endif // __LIBSEL4_ARCH_SIMPLE_TYPES diff --git a/libsel4/arch_include/arm/sel4/arch/syscalls.h b/libsel4/arch_include/arm/sel4/arch/syscalls.h index 05ea377e1..45b9bfc57 100644 --- a/libsel4/arch_include/arm/sel4/arch/syscalls.h +++ b/libsel4/arch_include/arm/sel4/arch/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_ARCH_SYSCALLS_H +#pragma once #include #include @@ -769,5 +768,3 @@ LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_Poll(seL4_CPtr src, seL4_Word *sende return seL4_NBRecv(src, sender); #endif } - -#endif diff --git a/libsel4/arch_include/arm/sel4/arch/types.h b/libsel4/arch_include/arm/sel4/arch/types.h index 709fa84b9..fc6a18e9b 100644 --- a/libsel4/arch_include/arm/sel4/arch/types.h +++ b/libsel4/arch_include/arm/sel4/arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_TYPES_H -#define __LIBSEL4_ARCH_TYPES_H +#pragma once #include #include @@ -35,4 +34,3 @@ typedef enum { SEL4_FORCE_LONG_ENUM(seL4_ARM_CacheType), } seL4_ARM_CacheType; -#endif /* __ARCH_SEL4TYPES_H__ */ diff --git a/libsel4/arch_include/riscv/sel4/arch/bootinfo.h b/libsel4/arch_include/riscv/sel4/arch/bootinfo.h index cb9f357e8..077e41045 100644 --- a/libsel4/arch_include/riscv/sel4/arch/bootinfo.h +++ b/libsel4/arch_include/riscv/sel4/arch/bootinfo.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_BOOTINFO_H -#define __LIBSEL4_ARCH_BOOTINFO_H +#pragma once /* Dummy include. No arch bootinfo on riscv yet */ -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/constants.h b/libsel4/arch_include/riscv/sel4/arch/constants.h index 08265e3b3..d55215b5d 100644 --- a/libsel4/arch_include/riscv/sel4/arch/constants.h +++ b/libsel4/arch_include/riscv/sel4/arch/constants.h @@ -4,7 +4,5 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_ARCH_CONSTANTS_H +#pragma once -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/deprecated.h b/libsel4/arch_include/riscv/sel4/arch/deprecated.h index ea43976bd..d55215b5d 100644 --- a/libsel4/arch_include/riscv/sel4/arch/deprecated.h +++ b/libsel4/arch_include/riscv/sel4/arch/deprecated.h @@ -4,7 +4,5 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_DEPRECATED_H -#define __LIBSEL4_ARCH_DEPRECATED_H +#pragma once -#endif /* __ARCH_DEPRECATED_H__ */ diff --git a/libsel4/arch_include/riscv/sel4/arch/exIPC.h b/libsel4/arch_include/riscv/sel4/arch/exIPC.h index 22d4ca466..b17c4f64f 100644 --- a/libsel4/arch_include/riscv/sel4/arch/exIPC.h +++ b/libsel4/arch_include/riscv/sel4/arch/exIPC.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_EXCEPTION_IPC -#define __LIBSEL4_ARCH_EXCEPTION_IPC - -#endif +#pragma once \ No newline at end of file diff --git a/libsel4/arch_include/riscv/sel4/arch/mapping.h b/libsel4/arch_include/riscv/sel4/arch/mapping.h index b906c1630..b17c4f64f 100644 --- a/libsel4/arch_include/riscv/sel4/arch/mapping.h +++ b/libsel4/arch_include/riscv/sel4/arch/mapping.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_MAPPING -#define __LIBSEL4_ARCH_MAPPING - -#endif +#pragma once \ No newline at end of file diff --git a/libsel4/arch_include/riscv/sel4/arch/objecttype.h b/libsel4/arch_include/riscv/sel4/arch/objecttype.h index 6c27a82a6..4976912c3 100644 --- a/libsel4/arch_include/riscv/sel4/arch/objecttype.h +++ b/libsel4/arch_include/riscv/sel4/arch/objecttype.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ARCH_OBJECTTYPE_H -#define __ARCH_OBJECTTYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -21,5 +20,4 @@ typedef enum _object { typedef seL4_Word object_t; -#endif /* __ARCH_OBJECTTYPE_H */ diff --git a/libsel4/arch_include/riscv/sel4/arch/pfIPC.h b/libsel4/arch_include/riscv/sel4/arch/pfIPC.h index 6f648c049..e453b9cf8 100644 --- a/libsel4/arch_include/riscv/sel4/arch/pfIPC.h +++ b/libsel4/arch_include/riscv/sel4/arch/pfIPC.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_PAGEFAULT_IPC -#define __LIBSEL4_ARCH_PAGEFAULT_IPC +#pragma once #include -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/shared_types.h b/libsel4/arch_include/riscv/sel4/arch/shared_types.h index 73aea079c..4b5606997 100644 --- a/libsel4/arch_include/riscv/sel4/arch/shared_types.h +++ b/libsel4/arch_include/riscv/sel4/arch/shared_types.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SHARED_TYPES_H -#define __LIBSEL4_ARCH_SHARED_TYPES_H +#pragma once #include #include #include -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/simple_types.h b/libsel4/arch_include/riscv/sel4/arch/simple_types.h index 275c98323..1aad54bb5 100644 --- a/libsel4/arch_include/riscv/sel4/arch/simple_types.h +++ b/libsel4/arch_include/riscv/sel4/arch/simple_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_ARCH_SIMPLE_TYPES_H_ +#pragma once typedef signed char seL4_Int8; typedef signed short seL4_Int16; @@ -15,4 +14,3 @@ typedef unsigned char seL4_Uint8; typedef unsigned short seL4_Uint16; typedef unsigned int seL4_Uint32; -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/syscalls.h b/libsel4/arch_include/riscv/sel4/arch/syscalls.h index 7e01f3171..58c84ba8c 100644 --- a/libsel4/arch_include/riscv/sel4/arch/syscalls.h +++ b/libsel4/arch_include/riscv/sel4/arch/syscalls.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_ARCH_SYSCALLS_H +#pragma once #include #include @@ -861,5 +860,3 @@ LIBSEL4_INLINE_FUNC void seL4_SetTLSBase(seL4_Word tls_base) asm volatile("" ::: "memory"); } #endif /* CONFIG_SET_TLS_BASE_SELF */ - -#endif diff --git a/libsel4/arch_include/riscv/sel4/arch/types.h b/libsel4/arch_include/riscv/sel4/arch/types.h index a5e7cdb65..e8ecdf900 100644 --- a/libsel4/arch_include/riscv/sel4/arch/types.h +++ b/libsel4/arch_include/riscv/sel4/arch/types.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_ARCH_TYPES_H -#define __LIBSEL4_ARCH_TYPES_H +#pragma once #include #include @@ -70,5 +69,3 @@ typedef enum { seL4_RISCV_Default_VMAttributes = 0, SEL4_FORCE_LONG_ENUM(seL4_RISCV_VMAttributes) } seL4_RISCV_VMAttributes; - -#endif diff --git a/libsel4/arch_include/x86/sel4/arch/bootinfo_types.h b/libsel4/arch_include/x86/sel4/arch/bootinfo_types.h index ec78d2214..0f43e2c61 100644 --- a/libsel4/arch_include/x86/sel4/arch/bootinfo_types.h +++ b/libsel4/arch_include/x86/sel4/arch/bootinfo_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_BOOTINFO_TYPES_H -#define __LIBSEL4_ARCH_BOOTINFO_TYPES_H +#pragma once #define SEL4_MULTIBOOT_MAX_MMAP_ENTRIES 50 #define SEL4_MULTIBOOT_RAM_REGION_TYPE 1 @@ -131,4 +130,3 @@ typedef struct seL4_X86_BootInfo_mmap { typedef struct multiboot2_fb seL4_X86_BootInfo_fb_t; -#endif // __LIBSEL4_ARCH_BOOTINFO_TYPES_H diff --git a/libsel4/arch_include/x86/sel4/arch/constants.h b/libsel4/arch_include/x86/sel4/arch/constants.h index 5613351c4..6b3170829 100644 --- a/libsel4/arch_include/x86/sel4/arch/constants.h +++ b/libsel4/arch_include/x86/sel4/arch/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_ARCH_CONSTANTS_H +#pragma once /* Currently MSIs do not go through a vt-d translation by * the kernel, therefore when the user programs an MSI they @@ -41,6 +40,4 @@ #define seL4_X86_EPTPTEntryBits 3 #define seL4_X86_EPTPTIndexBits 9 -#define seL4_X86_EPTPTBits (seL4_X86_EPTPTEntryBits + seL4_X86_EPTPTIndexBits) - -#endif +#define seL4_X86_EPTPTBits (seL4_X86_EPTPTEntryBits + seL4_X86_EPTPTIndexBits) \ No newline at end of file diff --git a/libsel4/arch_include/x86/sel4/arch/deprecated.h b/libsel4/arch_include/x86/sel4/arch/deprecated.h index d7310cca3..01ab43cb8 100644 --- a/libsel4/arch_include/x86/sel4/arch/deprecated.h +++ b/libsel4/arch_include/x86/sel4/arch/deprecated.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_DEPRECATED_H -#define __LIBSEL4_ARCH_DEPRECATED_H +#pragma once #include #include #include -#endif /* __SEL4_ARCH_DEPRECATED_H__ */ diff --git a/libsel4/arch_include/x86/sel4/arch/mapping.h b/libsel4/arch_include/x86/sel4/arch/mapping.h index e9834f1a9..6038f2a4f 100644 --- a/libsel4/arch_include/x86/sel4/arch/mapping.h +++ b/libsel4/arch_include/x86/sel4/arch/mapping.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_MAPPING -#define __LIBSEL4_ARCH_MAPPING +#pragma once #include @@ -13,4 +12,3 @@ #define SEL4_MAPPING_LOOKUP_NO_EPTPD 30 #define SEL4_MAPPING_LOOKUP_NO_EPTPT 21 -#endif diff --git a/libsel4/arch_include/x86/sel4/arch/objecttype.h b/libsel4/arch_include/x86/sel4/arch/objecttype.h index d2552cb01..f523e48cc 100644 --- a/libsel4/arch_include/x86/sel4/arch/objecttype.h +++ b/libsel4/arch_include/x86/sel4/arch/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __ARCH_OBJECT_TYPE_H -#define __ARCH_OBJECT_TYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -42,4 +41,3 @@ typedef seL4_Word object_t; #define seL4_X86_EPTPTObject 0xfffffa #endif -#endif diff --git a/libsel4/arch_include/x86/sel4/arch/syscalls.h b/libsel4/arch_include/x86/sel4/arch/syscalls.h index bfef0b303..96aa5d1ad 100644 --- a/libsel4/arch_include/x86/sel4/arch/syscalls.h +++ b/libsel4/arch_include/x86/sel4/arch/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_ARCH_SYSCALLS_H +#pragma once #include #include @@ -27,4 +26,3 @@ LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_Poll(seL4_CPtr src, seL4_Word *sende return seL4_NBRecv(src, sender); } #endif /* !CONFIG_KERNEL_MCS */ -#endif diff --git a/libsel4/arch_include/x86/sel4/arch/types.h b/libsel4/arch_include/x86/sel4/arch/types.h index f77ed6488..3188dacbb 100644 --- a/libsel4/arch_include/x86/sel4/arch/types.h +++ b/libsel4/arch_include/x86/sel4/arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_TYPES_H -#define __LIBSEL4_ARCH_TYPES_H +#pragma once #include #include @@ -40,5 +39,3 @@ typedef enum { typedef struct seL4_VCPUContext_ { seL4_Word eax, ebx, ecx, edx, esi, edi, ebp; } seL4_VCPUContext; - -#endif diff --git a/libsel4/arch_include/x86/sel4/arch/vmenter.h b/libsel4/arch_include/x86/sel4/arch/vmenter.h index 9b0f839f2..f659c35a7 100644 --- a/libsel4/arch_include/x86/sel4/arch/vmenter.h +++ b/libsel4/arch_include/x86/sel4/arch/vmenter.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_ARCH_VMENTER -#define __LIBSEL4_ARCH_VMENTER +#pragma once /* * When performing a seL4_SysVMEnter seL4 expects certain guest state to be @@ -61,4 +60,3 @@ #define SEL4_VMENTER_RESULT_FAULT_LEN 17 #define SEL4_VMENTER_RESULT_NOTIF_LEN 3 -#endif /* __LIBSEL4_ARCH_VMENTER */ diff --git a/libsel4/include/sel4/assert.h b/libsel4/include/sel4/assert.h index 58a509a7c..c49577e4a 100644 --- a/libsel4/include/sel4/assert.h +++ b/libsel4/include/sel4/assert.h @@ -12,9 +12,7 @@ * sl4_DebugCompileTimeAsssert. */ -#ifndef __LIBSEL4_ASSERT_H -#define __LIBSEL4_ASSERT_H - +#pragma once /** * Hidden function, use the macros seL4_Fail or seL4_Assert. */ @@ -45,4 +43,3 @@ void __assert_fail(const char *str, const char *file, int line, const char *fun #define seL4_CompileTimeAssert(expr) \ extern char __seL4_CompileTimeAssertFailed_ ## __COUNTER__[__builtin_constant_p(expr) ? ((expr) ? 1 : -1) : -1] __attribute__((unused)) -#endif // __LIBSEL4_ASSERT_H diff --git a/libsel4/include/sel4/benchmark_tracepoints_types.h b/libsel4/include/sel4/benchmark_tracepoints_types.h index eaa303e60..1a0a65418 100644 --- a/libsel4/include/sel4/benchmark_tracepoints_types.h +++ b/libsel4/include/sel4/benchmark_tracepoints_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef BENCHMARK_TRACE_POINTS_TYPES_H -#define BENCHMARK_TRACE_POINTS_TYPES_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -18,4 +17,3 @@ typedef struct benchmark_tracepoint_log_entry { } benchmark_tracepoint_log_entry_t; #endif /* CONFIG_BENCHMARK_TRACEPOINTS */ -#endif /* BENCHMARK_TRACE_POINTS_TYPES_H */ diff --git a/libsel4/include/sel4/benchmark_track_types.h b/libsel4/include/sel4/benchmark_track_types.h index ace30fb0f..7e8723a3c 100644 --- a/libsel4/include/sel4/benchmark_track_types.h +++ b/libsel4/include/sel4/benchmark_track_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef BENCHMARK_TRACK_TYPES_H -#define BENCHMARK_TRACK_TYPES_H +#pragma once #include @@ -67,4 +66,3 @@ typedef struct benchmark_syscall_log_entry { #endif /* CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES || CONFIG_DEBUG_BUILD */ -#endif /* BENCHMARK_TRACK_TYPES_H */ diff --git a/libsel4/include/sel4/benchmark_utilisation_types.h b/libsel4/include/sel4/benchmark_utilisation_types.h index e39f7a2ad..789d66b3e 100644 --- a/libsel4/include/sel4/benchmark_utilisation_types.h +++ b/libsel4/include/sel4/benchmark_utilisation_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef BENCHMARK_TRACK_UTIL_TYPES_H -#define BENCHMARK_TRACK_UTIL_TYPES_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -20,4 +19,4 @@ enum benchmark_track_util_ipc_index { }; #endif /* CONFIG_BENCHMARK_TRACK_UTILISATION */ -#endif /* BENCHMARK_TRACK_UTIL_TYPES_H */ + diff --git a/libsel4/include/sel4/bootinfo.h b/libsel4/include/sel4/bootinfo.h index 339902623..ab615e7eb 100644 --- a/libsel4/include/sel4/bootinfo.h +++ b/libsel4/include/sel4/bootinfo.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_BOOTINFO_H -#define __LIBSEL4_BOOTINFO_H +#pragma once #include #include @@ -16,4 +15,3 @@ SEL4_DEPRECATED("libsel4 management of bootinfo is deprecated, see the BootInfo seL4_BootInfo *seL4_GetBootInfo(void) SEL4_DEPRECATED("libsel4 management of bootinfo is deprecated, see the BootInfo Frame section of the manual"); -#endif // __LIBSEL4_BOOTINFO_H diff --git a/libsel4/include/sel4/bootinfo_types.h b/libsel4/include/sel4/bootinfo_types.h index 87936cea2..cef81fc60 100644 --- a/libsel4/include/sel4/bootinfo_types.h +++ b/libsel4/include/sel4/bootinfo_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_BOOTINFO_TYPES_H -#define __LIBSEL4_BOOTINFO_TYPES_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -97,4 +96,3 @@ typedef struct seL4_BootInfoHeader { #define SEL4_BOOTINFO_HEADER_FDT 6 #define SEL4_BOOTINFO_HEADER_NUM SEL4_BOOTINFO_HEADER_FDT + 1 -#endif // __LIBSEL4_BOOTINFO_TYPES_H diff --git a/libsel4/include/sel4/constants.h b/libsel4/include/sel4/constants.h index ba0f91e17..3080af4e7 100644 --- a/libsel4/include/sel4/constants.h +++ b/libsel4/include/sel4/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __API_CONSTANTS_H -#define __API_CONSTANTS_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -97,4 +96,4 @@ static inline seL4_Word seL4_MaxExtraRefills(seL4_Word size) } #endif /* !__ASSEMBLER__ */ #endif /* CONFIG_KERNEL_MCS */ -#endif /* __API_CONSTANTS_H */ + diff --git a/libsel4/include/sel4/debug_assert.h b/libsel4/include/sel4/debug_assert.h index 326851e23..2dcc2642e 100644 --- a/libsel4/include/sel4/debug_assert.h +++ b/libsel4/include/sel4/debug_assert.h @@ -10,8 +10,7 @@ * is a NOP, otherwise it invokes the unconditional version * in sel4/assert.h. */ -#ifndef __LIBSEL4_DEBUG_ASSERT_H -#define __LIBSEL4_DEBUG_ASSERT_H +#pragma once #ifdef NDEBUG @@ -29,4 +28,3 @@ #endif // NDEBUG -#endif // __LIBSEL4_DEBUG_ASSERT_H diff --git a/libsel4/include/sel4/deprecated.h b/libsel4/include/sel4/deprecated.h index 1c0063cfa..71e8670cf 100644 --- a/libsel4/include/sel4/deprecated.h +++ b/libsel4/include/sel4/deprecated.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_DEPRECATED_H -#define __LIBSEL4_SEL4_DEPRECATED_H +#pragma once #include #include @@ -128,5 +127,4 @@ static inline SEL4_DEPRECATED("Use seL4_CNode_CapData_new().words[0]") seL4_Word return seL4_CNode_CapData_new(guard, bits).words[0]; } -#endif // __LIBSEL4_SEL4_DEPRECATED_H diff --git a/libsel4/include/sel4/errors.h b/libsel4/include/sel4/errors.h index f2360c2d1..21ac19518 100644 --- a/libsel4/include/sel4/errors.h +++ b/libsel4/include/sel4/errors.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __ERRORS_H -#define __ERRORS_H +#pragma once typedef enum { seL4_NoError = 0, @@ -26,5 +25,3 @@ typedef enum { */ seL4_NumErrors } seL4_Error; - -#endif diff --git a/libsel4/include/sel4/functions.h b/libsel4/include/sel4/functions.h index 8961394da..0bceb5654 100644 --- a/libsel4/include/sel4/functions.h +++ b/libsel4/include/sel4/functions.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_ARCH_FUNCTIONS_H -#define __LIBSEL4_ARCH_FUNCTIONS_H +#pragma once #include #include @@ -84,4 +83,4 @@ LIBSEL4_INLINE_FUNC void seL4_SetCapReceivePath(seL4_CPtr receiveCNode, seL4_CPt ipcbuffer->receiveIndex = receiveIndex; ipcbuffer->receiveDepth = receiveDepth; } -#endif + diff --git a/libsel4/include/sel4/macros.h b/libsel4/include/sel4/macros.h index 3cdf47e17..e17da81eb 100644 --- a/libsel4/include/sel4/macros.h +++ b/libsel4/include/sel4/macros.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_MACROS_H -#define __LIBSEL4_MACROS_H +#pragma once #include @@ -49,4 +48,3 @@ #define SEL4_COMPILE_ASSERT(name, expr) typedef int __assert_failed_##name[(expr) ? 1 : -1]; #define SEL4_SIZE_SANITY(index, entry, size) SEL4_COMPILE_ASSERT(index##entry##size, index + entry == size) -#endif diff --git a/libsel4/include/sel4/objecttype.h b/libsel4/include/sel4/objecttype.h index a9ee3700d..cde32e8a4 100644 --- a/libsel4/include/sel4/objecttype.h +++ b/libsel4/include/sel4/objecttype.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __API_OBJECTTYPE_H -#define __API_OBJECTTYPE_H - +#pragma once typedef enum api_object { seL4_UntypedObject, seL4_TCBObject, @@ -25,4 +23,3 @@ __attribute__((deprecated("use seL4_NotificationObject"))) static const seL4_Obj typedef seL4_Word api_object_t; -#endif diff --git a/libsel4/include/sel4/sel4.h b/libsel4/include/sel4/sel4.h index 365412928..710fb7af3 100644 --- a/libsel4/include/sel4/sel4.h +++ b/libsel4/include/sel4/sel4.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_H -#define __LIBSEL4_SEL4_H - +#pragma once #include #include @@ -25,4 +23,4 @@ #include #include -#endif // __LIBSEL4_SEL4_H + diff --git a/libsel4/include/sel4/shared_types.h b/libsel4/include/sel4/shared_types.h index 13302dc4c..ca36774bf 100644 --- a/libsel4/include/sel4/shared_types.h +++ b/libsel4/include/sel4/shared_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SHARED_TYPES_H -#define __LIBSEL4_SHARED_TYPES_H +#pragma once /* this file is shared between the kernel and libsel4 */ @@ -41,4 +40,3 @@ enum { #define seL4_NoRead seL4_CapRights_new(1, 1, 0, 1) #define seL4_NoRights seL4_CapRights_new(0, 0, 0, 0) -#endif diff --git a/libsel4/include/sel4/simple_types.h b/libsel4/include/sel4/simple_types.h index b7e766fc4..5282dc40e 100644 --- a/libsel4/include/sel4/simple_types.h +++ b/libsel4/include/sel4/simple_types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SIMPLE_TYPES_H -#define __LIBSEL4_SIMPLE_TYPES_H +#pragma once /* Get the architectural types seL4_{u}int{N} */ #include @@ -23,4 +22,3 @@ typedef seL4_Int8 seL4_Bool; #define seL4_Null ((void*)0) #endif // __cplusplus -#endif // __LIBSEL4_SIMPLE_TYPES_H diff --git a/libsel4/include/sel4/syscalls.h b/libsel4/include/sel4/syscalls.h index efd3857f2..5d44e6c1e 100644 --- a/libsel4/include/sel4/syscalls.h +++ b/libsel4/include/sel4/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SYSCALLS_H -#define __LIBSEL4_SYSCALLS_H +#pragma once #include #include @@ -368,4 +367,3 @@ LIBSEL4_INLINE_FUNC void seL4_SetTLSBase(seL4_Word tls_base); #endif -#endif /* __LIBSEL4_SYSCALLS_H */ diff --git a/libsel4/include/sel4/syscalls_master.h b/libsel4/include/sel4/syscalls_master.h index b6bb489d0..86516f400 100644 --- a/libsel4/include/sel4/syscalls_master.h +++ b/libsel4/include/sel4/syscalls_master.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_MASTER_SYSCALLSH -#define __LIBSEL4_MASTER_SYSCALLSH +#pragma once #include /** @@ -228,4 +227,3 @@ seL4_Poll(seL4_CPtr src, seL4_Word *sender); /** @} */ -#endif /* __LIBSEL4_MASTER_SYSCALLSH */ diff --git a/libsel4/include/sel4/syscalls_mcs.h b/libsel4/include/sel4/syscalls_mcs.h index 99980d667..80808b755 100644 --- a/libsel4/include/sel4/syscalls_mcs.h +++ b/libsel4/include/sel4/syscalls_mcs.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_MCS_SYSCALLSH -#define __LIBSEL4_MCS_SYSCALLSH +#pragma once #include /** @@ -298,4 +297,3 @@ seL4_Signal(seL4_CPtr dest); /** @} */ -#endif /* __LIBSEL4_MCS_SYSCALLSH */ diff --git a/libsel4/include/sel4/types.h b/libsel4/include/sel4/types.h index 1001dc27e..6747bc25d 100644 --- a/libsel4/include/sel4/types.h +++ b/libsel4/include/sel4/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_TYPES_H -#define __LIBSEL4_TYPES_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -45,4 +44,3 @@ typedef seL4_Uint64 seL4_Time; #include -#endif diff --git a/libsel4/mode_include/32/sel4/mode/types.h b/libsel4/mode_include/32/sel4/mode/types.h index 7ea1b1990..73d215594 100644 --- a/libsel4/mode_include/32/sel4/mode/types.h +++ b/libsel4/mode_include/32/sel4/mode/types.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_MODE_TYPES_H -#define __LIBSEL4_MODE_TYPES_H +#pragma once #define seL4_GuardSizeBits 5 #define seL4_GuardBits 18 #define seL4_BadgeBits 28 -#endif diff --git a/libsel4/mode_include/64/sel4/mode/types.h b/libsel4/mode_include/64/sel4/mode/types.h index 0288d02d8..856b9c7c6 100644 --- a/libsel4/mode_include/64/sel4/mode/types.h +++ b/libsel4/mode_include/64/sel4/mode/types.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_MODE_TYPES_H -#define __LIBSEL4_MODE_TYPES_H +#pragma once #define seL4_GuardSizeBits 6 #define seL4_GuardBits 58 #define seL4_BadgeBits 64 - -#endif diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h index fd7c168ea..3e8870849 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_SEL4_ARCH_CONSTANTS_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -261,4 +260,3 @@ SEL4_SIZE_SANITY(seL4_PGDEntryBits, seL4_PGDIndexBits, seL4_PGDBits); /* IPC buffer is 512 bytes, giving size bits of 9 */ #define seL4_IPCBufferSizeBits 9 -#endif diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/deprecated.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/deprecated.h index bae6eb873..aed525951 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/deprecated.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/deprecated.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SEL4_DEPRECATED_H -#define __LIBSEL4_SEL4_ARCH_SEL4_DEPRECATED_H +#pragma once #include #include @@ -27,4 +26,3 @@ typedef seL4_Word seL4_ExceptIPCRegister SEL4_DEPRECATED("use seL4_UnknownSyscal #define EXCEPT_IPC_SYS_MR_SYSCALL SEL4_DEPRECATE_MACRO(seL4_UnknownSyscall_Syscall) #define EXCEPT_IPC_LENGTH SEL4_DEPRECATE_MACRO(seL4_UnknownSyscall_Length) -#endif /* __ARCH_SEL4_DEPRECATED_H__ */ diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/mapping.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/mapping.h index 47acfbf66..5b7d20b97 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/mapping.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/mapping.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_MAPPING -#define __LIBSEL4_SEL4_ARCH_MAPPING +#pragma once #ifdef HAVE_AUTOCONF #include @@ -24,4 +23,3 @@ LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel(void) return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } -#endif diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/objecttype.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/objecttype.h index dcadd7f25..974b28b02 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/objecttype.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/objecttype.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __SEL4_ARCH_OBJECT_TYPE_H -#define __SEL4_ARCH_OBJECT_TYPE_H +#pragma once typedef enum _mode_object { seL4_ModeObjectTypeCount = seL4_NonArchObjectTypeCount, } seL4_ModeObjectType; - -#endif diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/simple_types.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/simple_types.h index ce1ec339a..4e427d072 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/simple_types.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/simple_types.h @@ -4,12 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ +#pragma once typedef signed long long seL4_Int64; typedef unsigned long long seL4_Uint64; -#endif // __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h index 26daad324..8727f2621 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_SEL4_ARCH_SYSCALLS_H +#pragma once #include #include @@ -221,5 +220,3 @@ static inline void arm_sys_null(seL4_Word sys) : "r"(scno) ); } - -#endif /* __LIBSEL4_SEL4_ARCH_SYSCALLS_H */ diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h index 69ee14572..ab8020328 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_TYPES_H -#define __LIBSEL4_SEL4_ARCH_TYPES_H +#pragma once #include @@ -24,4 +23,3 @@ typedef struct seL4_UserContext_ { seL4_Word tpidrurw; } seL4_UserContext; -#endif /* __LIBSEL4_SEL4_ARCH_TYPES_H */ diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/constants.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/constants.h index c8a7fe071..d07ddbff1 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/constants.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_SEL4_ARCH_CONSTANTS_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -147,5 +146,3 @@ enum { /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 - -#endif diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/deprecated.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/deprecated.h index 90a2e6239..7d900a54b 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/deprecated.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/deprecated.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SEL4_DEPRECATED_H -#define __LIBSEL4_SEL4_ARCH_SEL4_DEPRECATED_H +#pragma once #include #include @@ -85,4 +84,3 @@ static inline SEL4_DEPRECATED("") seL4_Bool seL4_Fault_isNonPresentFault(seL4_Wo return !(FaultStatusRegister & 0x1); } -#endif /* __ARCH_SEL4_DEPRECATED_H__ */ diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/mapping.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/mapping.h index 4f4dc94dd..7b939c824 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/mapping.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/mapping.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_MAPPING -#define __LIBSEL4_SEL4_ARCH_MAPPING - +#pragma once #include #define SEL4_MAPPING_LOOKUP_LEVEL 2 @@ -17,4 +15,4 @@ LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel(void) return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } -#endif + diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/objecttype.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/objecttype.h index 5bbcc27fa..0eef981a4 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/objecttype.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __SEL4_ARCH_OBJECT_TYPE_H -#define __SEL4_ARCH_OBJECT_TYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -17,4 +16,3 @@ typedef enum _mode_object { #define seL4_IA32_PDPTObject 0xffffffff -#endif diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/simple_types.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/simple_types.h index 79766f1ce..dd28fc0b1 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/simple_types.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/simple_types.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ - +#pragma once typedef signed char seL4_Int8; typedef signed short seL4_Int16; typedef signed int seL4_Int32; @@ -18,5 +16,3 @@ typedef unsigned int seL4_Uint32; typedef unsigned long long seL4_Uint64; -#endif // __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ - diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h index 8b407de1c..f2f807cc4 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_SEL4_ARCH_SYSCALLS_H +#pragma once #include #include @@ -983,5 +982,3 @@ LIBSEL4_INLINE_FUNC void seL4_SetTLSBase(seL4_Word tls_base) asm volatile("" ::: "memory"); } #endif /* CONFIG_SET_TLS_BASE_SELF */ - -#endif diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h index d162320ae..673a8f081 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_TYPES_H -#define __LIBSEL4_SEL4_ARCH_TYPES_H +#pragma once #include @@ -24,4 +23,3 @@ typedef struct seL4_UserContext_ { seL4_Word fs_base, gs_base; } seL4_UserContext; -#endif diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/constants.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/constants.h index b2ed477ea..54d3a8fb8 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/constants.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/constants.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_SEL4_ARCH_CONSTANTS_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -125,5 +124,3 @@ enum { /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0x80000000lu - -#endif diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/deprecated.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/deprecated.h index 804e59615..1d570993f 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/deprecated.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/deprecated.h @@ -3,8 +3,4 @@ * * SPDX-License-Identifier: BSD-2-Clause */ - -#ifndef __LIBSEL4_SEL4_ARCH_DEPRECATED_H -#define __LIBSEL4_SEL4_ARCH_DEPRECATED_H - -#endif /* __LIBSEL4_SEL4_ARCH_DEPRECATED_H__ */ +#pragma once \ No newline at end of file diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/faults.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/faults.h index 2b08805dc..6c3f003da 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/faults.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/faults.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_FAULTS_H -#define __LIBSEL4_SEL4_ARCH_FAULTS_H +#pragma once #include #include @@ -51,4 +50,3 @@ LIBSEL4_INLINE_FUNC seL4_Fault_t seL4_getArchFault(seL4_MessageInfo_t tag) } } -#endif /* __LIBSEL4_SEL4_ARCH_FAULTS_H */ diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/mapping.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/mapping.h index 7f69601c3..c588fb32c 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/mapping.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/mapping.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_MAPPING -#define __LIBSEL4_SEL4_ARCH_MAPPING +#pragma once #include @@ -23,5 +22,3 @@ LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel() #else #error "Only 2-level PTs are supported for RV32" #endif - -#endif diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/objecttype.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/objecttype.h index fd9ad7e1c..86a8a2775 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/objecttype.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __SEL4_ARCH_OBJECT_TYPE_H -#define __SEL4_ARCH_OBJECT_TYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -15,4 +14,3 @@ typedef enum _mode_object { seL4_ModeObjectTypeCount = seL4_NonArchObjectTypeCount } seL4_ModeObjectType; -#endif diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/simple_types.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/simple_types.h index edcf574ce..72cf3e738 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/simple_types.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/simple_types.h @@ -4,11 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ - +#pragma once typedef signed long long seL4_Int64; typedef unsigned long long seL4_Uint64; -#endif // __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ - diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/syscalls.h index 0fb809659..f31d9a92a 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/syscalls.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_SEL4_ARCH_SYSCALLS_H - -#endif /* __LIBSEL4_SEL4_ARCH_SYSCALLS_H */ +#pragma once diff --git a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/types.h index fdc620f02..d91b01137 100644 --- a/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/riscv32/sel4/sel4_arch/types.h @@ -5,13 +5,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_TYPES_H -#define __LIBSEL4_SEL4_ARCH_TYPES_H +#pragma once #include #include #define seL4_WordBits 32 typedef seL4_Uint32 seL4_Word; - -#endif diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/constants.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/constants.h index eef3e1fef..54ba58ae6 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/constants.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/constants.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_CONSTANTS_H -#define __LIBSEL4_SEL4_ARCH_CONSTANTS_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -126,5 +125,3 @@ enum { /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0x0000003ffffff000 - -#endif diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/deprecated.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/deprecated.h index 804e59615..f31d9a92a 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/deprecated.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/deprecated.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_DEPRECATED_H -#define __LIBSEL4_SEL4_ARCH_DEPRECATED_H - -#endif /* __LIBSEL4_SEL4_ARCH_DEPRECATED_H__ */ +#pragma once diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/faults.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/faults.h index 986ae4d15..38fbca9a6 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/faults.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/faults.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_FAULTS_H -#define __LIBSEL4_SEL4_ARCH_FAULTS_H +#pragma once #include #include @@ -50,4 +49,3 @@ LIBSEL4_INLINE_FUNC seL4_Fault_t seL4_getArchFault(seL4_MessageInfo_t tag) } } -#endif /* __LIBSEL4_SEL4_ARCH_FAULTS_H */ diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/mapping.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/mapping.h index bffafdf6d..bca034f25 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/mapping.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/mapping.h @@ -5,9 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_MAPPING -#define __LIBSEL4_SEL4_ARCH_MAPPING - +#pragma once #include #include @@ -20,5 +18,3 @@ LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel() } #define SEL4_MAPPING_LOOKUP_NO_PT 21 - -#endif diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/objecttype.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/objecttype.h index 3f56237f1..b1ed662a6 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/objecttype.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/objecttype.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __SEL4_ARCH_OBJECT_TYPE_H -#define __SEL4_ARCH_OBJECT_TYPE_H +#pragma once #ifdef HAVE_AUTOCONF #include @@ -24,4 +23,3 @@ typedef enum _mode_object { #define seL4_RISCV_Tera_Page 0xffffffff #endif -#endif diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/simple_types.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/simple_types.h index 8f8037fbe..a0089c679 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/simple_types.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/simple_types.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ +#pragma once typedef signed long seL4_Int64; typedef unsigned long seL4_Uint64; -#endif // __LIBSEL4_SEL4_ARCH_SIMPLE_TYPES_H_ diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/syscalls.h index 0fb809659..f31d9a92a 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/syscalls.h @@ -4,7 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_SYSCALLS_H -#define __LIBSEL4_SEL4_ARCH_SYSCALLS_H - -#endif /* __LIBSEL4_SEL4_ARCH_SYSCALLS_H */ +#pragma once diff --git a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/types.h index cb1f72178..1ffecf6d7 100644 --- a/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/riscv64/sel4/sel4_arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __LIBSEL4_SEL4_ARCH_TYPES_H -#define __LIBSEL4_SEL4_ARCH_TYPES_H +#pragma once #include #include @@ -13,4 +12,3 @@ #define seL4_WordBits 64 typedef seL4_Uint64 seL4_Word; -#endif diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/constants.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/constants.h index c109db8da..dfe64fe7f 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/constants.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_CONSTANTS_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_CONSTANTS_H_ +#pragma once #include @@ -156,4 +155,3 @@ enum { /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0x00007ffffffff000 -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_CONSTANTS_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/deprecated.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/deprecated.h index ad7677a52..1f9dc5698 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/deprecated.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/deprecated.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_DEPRECATED_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_DEPRECATED_H_ +#pragma once #include #include #include -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_DEPRECATED_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/faults.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/faults.h index 9f7216091..9afcb3627 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/faults.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/faults.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_ARCH_FAULTS_H -#define __LIBSEL4_SEL4_ARCH_FAULTS_H +#pragma once #include #include @@ -56,5 +55,3 @@ LIBSEL4_INLINE_FUNC seL4_Fault_t seL4_getArchFault(seL4_MessageInfo_t tag) } } - -#endif diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/mapping.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/mapping.h index eb5fb60a2..d54a57d34 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/mapping.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/mapping.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_MAPPING_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_MAPPING_H_ - +#pragma once #define SEL4_MAPPING_LOOKUP_LEVEL 2 #define SEL4_MAPPING_LOOKUP_NO_PT 21 #define SEL4_MAPPING_LOOKUP_NO_PD 30 @@ -17,4 +15,4 @@ LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel(void) return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_MAPPING_H_ */ + diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/objecttype.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/objecttype.h index d85457407..cba066a28 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/objecttype.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/objecttype.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_OBJECTTYPE_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_OBJECTTYPE_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -27,4 +26,3 @@ typedef enum _mode_object { #define seL4_X64_HugePageObject 0xfffffffe #endif -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_OBJECTTYPE_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/simple_types.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/simple_types.h index c06a23238..61dcfe2c8 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/simple_types.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/simple_types.h @@ -3,10 +3,7 @@ * * SPDX-License-Identifier: BSD-2-Clause */ - -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_SIMPLE_TYPES_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_SIMPLE_TYPES_H_ - +#pragma once typedef signed char seL4_Int8; typedef signed short seL4_Int16; typedef signed int seL4_Int32; @@ -17,4 +14,3 @@ typedef unsigned short seL4_Uint16; typedef unsigned int seL4_Uint32; typedef unsigned long seL4_Uint64; -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_SIMPLE_TYPES_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls.h index 42197670f..c254c2c54 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_H_ +#pragma once #include #ifdef CONFIG_KERNEL_MCS @@ -768,4 +767,3 @@ LIBSEL4_INLINE_FUNC void seL4_SetTLSBase(seL4_Word tls_base) } #endif /* CONFIG_SET_TLS_BASE_SELF */ -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_syscall.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_syscall.h index 641b7666d..c327709e9 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_syscall.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_syscall.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSCALL_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSCALL_H_ +#pragma once #include #include @@ -200,5 +199,3 @@ static inline void x64_sys_null(seL4_Word sys) : "%rbx", "%rcx", "%rsi", "%rdi", "%r11" ); } - -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSCALL_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_sysenter.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_sysenter.h index 08a708e20..8a853d7fc 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_sysenter.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/syscalls_sysenter.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSENTER_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSENTER_H_ +#pragma once #include #include @@ -207,4 +206,3 @@ static inline void x64_sys_null(seL4_Word sys) ); } -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_SYSCALLS_SYSENTER_H_ */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h index 3464f1e87..9f824b09d 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_SEL4_ARCH_TYPES_H_ -#define __LIBSEL4_SEL4_SEL4_ARCH_TYPES_H_ +#pragma once #include #include @@ -27,4 +26,3 @@ typedef struct seL4_UserContext_ { seL4_Word fs_base, gs_base; } seL4_UserContext; -#endif /* __LIBSEL4_SEL4_SEL4_ARCH_TYPES_H_ */ diff --git a/libsel4/sel4_plat_include/allwinnerA20/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/allwinnerA20/sel4/plat/api/constants.h index a528412da..432398692 100644 --- a/libsel4/sel4_plat_include/allwinnerA20/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/allwinnerA20/sel4/plat/api/constants.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include @@ -24,4 +22,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xa0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/am335x/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/am335x/sel4/plat/api/constants.h index 6f3480521..aa1deca34 100644 --- a/libsel4/sel4_plat_include/am335x/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/am335x/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/apq8064/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/apq8064/sel4/plat/api/constants.h index 4e34b4f2b..a50dde84e 100644 --- a/libsel4/sel4_plat_include/apq8064/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/apq8064/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/ariane/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/ariane/sel4/plat/api/constants.h index d55c59984..030a64729 100644 --- a/libsel4/sel4_plat_include/ariane/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/ariane/sel4/plat/api/constants.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/bcm2837/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/bcm2837/sel4/plat/api/constants.h index 227191af2..d233795c4 100644 --- a/libsel4/sel4_plat_include/bcm2837/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/bcm2837/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -26,5 +25,3 @@ #else /* otherwise this is defined at the arch level */ #endif - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/exynos4/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/exynos4/sel4/plat/api/constants.h index f1a1ce214..ca0d9cf25 100644 --- a/libsel4/sel4_plat_include/exynos4/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/exynos4/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,4 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/exynos5/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/exynos5/sel4/plat/api/constants.h index 4e34b4f2b..9c9e0fe94 100644 --- a/libsel4/sel4_plat_include/exynos5/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/exynos5/sel4/plat/api/constants.h @@ -3,9 +3,7 @@ * * SPDX-License-Identifier: BSD-2-Clause */ - -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -22,5 +20,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/exynos_common/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/exynos_common/sel4/plat/api/constants.h index 02fe8fc55..f31d9a92a 100644 --- a/libsel4/sel4_plat_include/exynos_common/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/exynos_common/sel4/plat/api/constants.h @@ -4,8 +4,4 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ - +#pragma once diff --git a/libsel4/sel4_plat_include/fvp/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/fvp/sel4/plat/api/constants.h index 32b0692e1..b0c6512a9 100644 --- a/libsel4/sel4_plat_include/fvp/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/fvp/sel4/plat/api/constants.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include #endif @@ -20,4 +18,3 @@ #define seL4_NumDualFunctionMonitors (0) #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/hifive/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/hifive/sel4/plat/api/constants.h index d55c59984..2cb540bac 100644 --- a/libsel4/sel4_plat_include/hifive/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/hifive/sel4/plat/api/constants.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include #endif - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/hikey/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/hikey/sel4/plat/api/constants.h index 52151c924..64a219b88 100644 --- a/libsel4/sel4_plat_include/hikey/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/hikey/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -26,4 +25,4 @@ #else /* otherwise this is defined at the arch level */ #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/imx31/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/imx31/sel4/plat/api/constants.h index 671f1c874..ad9456df0 100644 --- a/libsel4/sel4_plat_include/imx31/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/imx31/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,4 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xf0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/imx6/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/imx6/sel4/plat/api/constants.h index f1a1ce214..ca0d9cf25 100644 --- a/libsel4/sel4_plat_include/imx6/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/imx6/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,4 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h index d26aa0c35..7e1a2a6a4 100644 --- a/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -26,4 +25,3 @@ /* otherwise this is defined at the arch level */ #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/odroidc2/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/odroidc2/sel4/plat/api/constants.h index 7e7dea1a7..8a3d65224 100644 --- a/libsel4/sel4_plat_include/odroidc2/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/odroidc2/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -20,4 +19,4 @@ #define seL4_NumDualFunctionMonitors (0) #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/omap3/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/omap3/sel4/plat/api/constants.h index 67149d320..81dddeb8c 100644 --- a/libsel4/sel4_plat_include/omap3/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/omap3/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -23,4 +22,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xf0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/pc99/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/pc99/sel4/plat/api/constants.h index 7d8f1aeee..14b8a5f24 100644 --- a/libsel4/sel4_plat_include/pc99/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/pc99/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -24,4 +23,3 @@ #define seL4_NumDualFunctionMonitors (4) #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/qemu-arm-virt/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/qemu-arm-virt/sel4/plat/api/constants.h index a20675837..3b6912e3e 100644 --- a/libsel4/sel4_plat_include/qemu-arm-virt/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/qemu-arm-virt/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF @@ -27,4 +26,4 @@ #define seL4_UserTop 0xa0000000 #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/rocketchip/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/rocketchip/sel4/plat/api/constants.h index d55c59984..01e86e129 100644 --- a/libsel4/sel4_plat_include/rocketchip/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/rocketchip/sel4/plat/api/constants.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/rockpro64/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/rockpro64/sel4/plat/api/constants.h index 5fc29fda7..01e86e129 100644 --- a/libsel4/sel4_plat_include/rockpro64/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/rockpro64/sel4/plat/api/constants.h @@ -4,10 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/spike/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/spike/sel4/plat/api/constants.h index d55c59984..01e86e129 100644 --- a/libsel4/sel4_plat_include/spike/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/spike/sel4/plat/api/constants.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/tk1/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/tk1/sel4/plat/api/constants.h index 4e34b4f2b..dffcc4f52 100644 --- a/libsel4/sel4_plat_include/tk1/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/tk1/sel4/plat/api/constants.h @@ -4,9 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include #endif @@ -23,4 +21,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/tx1/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/tx1/sel4/plat/api/constants.h index d55c59984..a76ef1145 100644 --- a/libsel4/sel4_plat_include/tx1/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/tx1/sel4/plat/api/constants.h @@ -4,11 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ + diff --git a/libsel4/sel4_plat_include/tx2/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/tx2/sel4/plat/api/constants.h index d55c59984..030a64729 100644 --- a/libsel4/sel4_plat_include/tx2/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/tx2/sel4/plat/api/constants.h @@ -4,11 +4,8 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ - +#pragma once #ifdef HAVE_AUTOCONF #include #endif -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/zynq7000/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/zynq7000/sel4/plat/api/constants.h index f1a1ce214..ca145ddaa 100644 --- a/libsel4/sel4_plat_include/zynq7000/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/zynq7000/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -22,5 +21,3 @@ /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */ diff --git a/libsel4/sel4_plat_include/zynqmp/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/zynqmp/sel4/plat/api/constants.h index d7f710109..4f11d4718 100644 --- a/libsel4/sel4_plat_include/zynqmp/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/zynqmp/sel4/plat/api/constants.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifndef __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ -#define __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ +#pragma once #ifdef HAVE_AUTOCONF #include @@ -26,5 +25,3 @@ #else /* otherwise this is defined at the architecture level */ #endif - -#endif /* __LIBSEL4_SEL4_PLAT_API_CONSTANTS_H_ */