diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-23 13:31:17 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-23 13:31:17 +0200 |
| commit | 2d8fed40bd0d0f8144783b6b344dc79944291b72 (patch) | |
| tree | 81e8f29078723e807ad6b32391a884136ec6dd14 | |
| parent | dec3c3b0387ec477125db21e741bc492d3475db5 (diff) | |
| download | kernel-2d8fed40bd0d0f8144783b6b344dc79944291b72.tar.xz kernel-2d8fed40bd0d0f8144783b6b344dc79944291b72.zip | |
chore: organize includes
81 files changed, 224 insertions, 188 deletions
diff --git a/.clang-format b/.clang-format index e54cb034..57204ccb 100644 --- a/.clang-format +++ b/.clang-format @@ -55,23 +55,39 @@ DerivePointerAlignment: "false" FixNamespaceComments: "true" IncludeBlocks: Regroup IncludeCategories: - - Regex: 'kapi/[[:alnum:]._\/]+\.hpp' + # Platform Headers + - Regex: 'arch/[[:alnum:]._\/]+\.hpp' Priority: 100 - - Regex: 'x86_64/[[:alnum:]._\/]+\.hpp' - Priority: 110 - - Regex: '"[[:alnum:]._\/]+\.hpp"' - Priority: 300 - - Regex: '<kstd/[[:alnum:]._\/]+>' - Priority: 400 - - Regex: '<[[:alnum:]._\/]+\.hpp>' + # Kernel Headers + - Regex: 'kernel/[[:alnum:]._\/]+\.hpp' + Priority: 125 + # KAPI Headers + - Regex: 'kapi/[[:alnum:]._\/]+\.hpp' + Priority: 150 + # Library Headers + - Regex: 'acpi/[[:alnum:]._\/]+\.hpp' + Priority: 200 + - Regex: 'elf/[[:alnum:]._\/]+\.hpp' + Priority: 210 + - Regex: 'kstd/[[:alnum:]._\/]+(\.hpp)?' + Priority: 220 + - Regex: 'multiboot2/[[:alnum:]._\/]+\.hpp' + Priority: 230 + # Catch2 Headers + - Regex: 'catch2/[[:alnum:]._\/]+\.hpp' Priority: 600 - - Regex: '<[[:alnum:]._]+(?!\.(h|hpp))>' + # Standard Headers + - Regex: '<[[:alnum:]._]+>' Priority: 900 + # Local Headers + - Regex: '".*"' + Priority: 10 IndentCaseLabels: "true" IndentPPDirectives: None IndentWidth: "2" KeepEmptyLinesAtTheStartOfBlocks: "false" Language: Cpp +MainIncludeChar: "Any" MaxEmptyLinesToKeep: "1" NamespaceIndentation: All PointerAlignment: Middle diff --git a/arch/x86_64/include/arch/cpu/global_descriptor_table.hpp b/arch/x86_64/include/arch/cpu/global_descriptor_table.hpp index 402c87d2..bc7d3282 100644 --- a/arch/x86_64/include/arch/cpu/global_descriptor_table.hpp +++ b/arch/x86_64/include/arch/cpu/global_descriptor_table.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_X86_64_GLOBAL_DESCRIPTOR_TABLE_HPP #define TEACHOS_X86_64_GLOBAL_DESCRIPTOR_TABLE_HPP -#include "kapi/memory.hpp" - #include "arch/cpu/segment_descriptor.hpp" +#include "kapi/memory.hpp" + #include <algorithm> #include <array> #include <bit> diff --git a/arch/x86_64/include/arch/cpu/interrupts.hpp b/arch/x86_64/include/arch/cpu/interrupts.hpp index b9adb6e4..24b72e97 100644 --- a/arch/x86_64/include/arch/cpu/interrupts.hpp +++ b/arch/x86_64/include/arch/cpu/interrupts.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_X86_64_CPU_INTERRUPTS_HPP #define TEACHOS_X86_64_CPU_INTERRUPTS_HPP -#include "kapi/memory.hpp" - #include "arch/cpu/segment_selector.hpp" +#include "kapi/memory.hpp" + #include <array> #include <cstdint> #include <type_traits> diff --git a/arch/x86_64/include/arch/cpu/registers.hpp b/arch/x86_64/include/arch/cpu/registers.hpp index d7def105..62206bfb 100644 --- a/arch/x86_64/include/arch/cpu/registers.hpp +++ b/arch/x86_64/include/arch/cpu/registers.hpp @@ -1,11 +1,11 @@ #ifndef TEACHOS_X86_64_CPU_REGISTERS_HPP #define TEACHOS_X86_64_CPU_REGISTERS_HPP -#include "kapi/memory.hpp" - #include "arch/cpu/control_register.hpp" // IWYU pragma: export #include "arch/cpu/model_specific_register.hpp" // IWYU pragma: export +#include "kapi/memory.hpp" + namespace arch::cpu { diff --git a/arch/x86_64/include/arch/debug/qemu_output.hpp b/arch/x86_64/include/arch/debug/qemu_output.hpp index e72eb392..f43e147d 100644 --- a/arch/x86_64/include/arch/debug/qemu_output.hpp +++ b/arch/x86_64/include/arch/debug/qemu_output.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_X86_64_DEBUG_QEMU_OUTPUT_HPP #define TEACHOS_X86_64_DEBUG_QEMU_OUTPUT_HPP -#include "kapi/cio.hpp" - #include "arch/device_io/port_io.hpp" +#include "kapi/cio.hpp" + #include <string_view> namespace arch::debug diff --git a/arch/x86_64/include/arch/memory/higher_half_mapper.hpp b/arch/x86_64/include/arch/memory/higher_half_mapper.hpp index c8df40c9..24bea174 100644 --- a/arch/x86_64/include/arch/memory/higher_half_mapper.hpp +++ b/arch/x86_64/include/arch/memory/higher_half_mapper.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_X86_64_HIGHER_HALF_MAPPER_HPP #define TEACHOS_X86_64_HIGHER_HALF_MAPPER_HPP -#include "kapi/memory.hpp" - #include "arch/memory/page_table.hpp" +#include "kapi/memory.hpp" + #include <cstddef> namespace arch::memory diff --git a/arch/x86_64/include/arch/memory/kernel_mapper.hpp b/arch/x86_64/include/arch/memory/kernel_mapper.hpp index 4329f1b7..ae593a5e 100644 --- a/arch/x86_64/include/arch/memory/kernel_mapper.hpp +++ b/arch/x86_64/include/arch/memory/kernel_mapper.hpp @@ -5,6 +5,7 @@ #include <elf/format.hpp> #include <elf/section_header.hpp> + #include <multiboot2/information.hpp> #include <cstdint> diff --git a/arch/x86_64/include/arch/vga/text/device.hpp b/arch/x86_64/include/arch/vga/text/device.hpp index 11b32814..d0eb45df 100644 --- a/arch/x86_64/include/arch/vga/text/device.hpp +++ b/arch/x86_64/include/arch/vga/text/device.hpp @@ -3,10 +3,10 @@ // IWYU pragma: private, include "arch/vga/text.hpp" -#include "kapi/cio.hpp" - #include "arch/vga/text/buffer.hpp" +#include "kapi/cio.hpp" + #include <string_view> namespace arch::vga::text diff --git a/arch/x86_64/kapi/boot_modules.cpp b/arch/x86_64/kapi/boot_modules.cpp index ba012853..1a588cfd 100644 --- a/arch/x86_64/kapi/boot_modules.cpp +++ b/arch/x86_64/kapi/boot_modules.cpp @@ -1,14 +1,14 @@ #include "kapi/boot_modules.hpp" +#include "arch/boot/boot.hpp" +#include "arch/boot/ld.hpp" + #include "kapi/boot.hpp" #include "kapi/boot_module/boot_module.hpp" #include "kapi/boot_module/boot_module_registry.hpp" #include "kapi/memory.hpp" #include "kapi/system.hpp" -#include "arch/boot/boot.hpp" -#include "arch/boot/ld.hpp" - #include <kstd/print> #include <multiboot2/information.hpp> diff --git a/arch/x86_64/kapi/cpu.cpp b/arch/x86_64/kapi/cpu.cpp index 965998cb..baeab4be 100644 --- a/arch/x86_64/kapi/cpu.cpp +++ b/arch/x86_64/kapi/cpu.cpp @@ -1,19 +1,19 @@ #include "kapi/cpu.hpp" +#include "arch/cpu/initialization.hpp" +#include "arch/devices/local_apic.hpp" + #include "kapi/acpi.hpp" #include "kapi/devices.hpp" #include "kapi/devices/cpu.hpp" #include "kapi/memory.hpp" #include "kapi/system.hpp" -#include "arch/cpu/initialization.hpp" -#include "arch/devices/local_apic.hpp" +#include <acpi/acpi.hpp> #include <kstd/memory> #include <kstd/print> -#include <acpi/acpi.hpp> - #include <atomic> #include <ranges> #include <utility> diff --git a/arch/x86_64/kapi/memory.cpp b/arch/x86_64/kapi/memory.cpp index 5f12e5c9..423913d9 100644 --- a/arch/x86_64/kapi/memory.cpp +++ b/arch/x86_64/kapi/memory.cpp @@ -1,8 +1,5 @@ #include "kapi/memory.hpp" -#include "kapi/boot.hpp" -#include "kapi/system.hpp" - #include "arch/boot/boot.hpp" #include "arch/boot/ld.hpp" #include "arch/cpu/registers.hpp" @@ -12,6 +9,9 @@ #include "arch/memory/page_utilities.hpp" #include "arch/memory/region_allocator.hpp" +#include "kapi/boot.hpp" +#include "kapi/system.hpp" + #include <kstd/print> #include <kstd/units> diff --git a/arch/x86_64/src/cpu/interrupts.cpp b/arch/x86_64/src/cpu/interrupts.cpp index 907f289a..f58b8511 100644 --- a/arch/x86_64/src/cpu/interrupts.cpp +++ b/arch/x86_64/src/cpu/interrupts.cpp @@ -1,12 +1,12 @@ #include "arch/cpu/interrupts.hpp" +#include "arch/cpu/legacy_pic.hpp" +#include "arch/cpu/segment_selector.hpp" + #include "kapi/cpu.hpp" #include "kapi/interrupts.hpp" #include "kapi/memory.hpp" -#include "arch/cpu/legacy_pic.hpp" -#include "arch/cpu/segment_selector.hpp" - #include <kstd/print> #include <cstdint> diff --git a/arch/x86_64/src/devices/init.cpp b/arch/x86_64/src/devices/init.cpp index 7f0faa4a..8c96b385 100644 --- a/arch/x86_64/src/devices/init.cpp +++ b/arch/x86_64/src/devices/init.cpp @@ -1,18 +1,18 @@ #include "arch/devices/init.hpp" +#include "arch/boot/boot.hpp" +#include "arch/bus/isa.hpp" +#include "arch/devices/legacy_pit.hpp" + #include "kapi/acpi.hpp" #include "kapi/cpu.hpp" #include "kapi/devices.hpp" -#include "arch/boot/boot.hpp" -#include "arch/bus/isa.hpp" -#include "arch/devices/legacy_pit.hpp" +#include <acpi/acpi.hpp> #include <kstd/memory> #include <kstd/print> -#include <acpi/acpi.hpp> - #include <cstdint> #include <utility> diff --git a/arch/x86_64/src/devices/legacy_pit.cpp b/arch/x86_64/src/devices/legacy_pit.cpp index a8df3c37..44ff499a 100644 --- a/arch/x86_64/src/devices/legacy_pit.cpp +++ b/arch/x86_64/src/devices/legacy_pit.cpp @@ -1,11 +1,11 @@ #include "arch/devices/legacy_pit.hpp" +#include "arch/device_io/port_io.hpp" + #include "kapi/devices.hpp" #include "kapi/devices/device.hpp" #include "kapi/interrupts.hpp" -#include "arch/device_io/port_io.hpp" - #include <cstddef> #include <cstdint> diff --git a/arch/x86_64/src/memory/higher_half_mapper.cpp b/arch/x86_64/src/memory/higher_half_mapper.cpp index abb54a37..b0d19958 100644 --- a/arch/x86_64/src/memory/higher_half_mapper.cpp +++ b/arch/x86_64/src/memory/higher_half_mapper.cpp @@ -1,11 +1,11 @@ #include "arch/memory/higher_half_mapper.hpp" -#include "kapi/memory.hpp" -#include "kapi/system.hpp" - #include "arch/memory/page_table.hpp" #include "arch/memory/page_utilities.hpp" +#include "kapi/memory.hpp" +#include "kapi/system.hpp" + #include <algorithm> #include <array> #include <cstddef> diff --git a/arch/x86_64/src/memory/kernel_mapper.cpp b/arch/x86_64/src/memory/kernel_mapper.cpp index ced8a14c..46d4dcaa 100644 --- a/arch/x86_64/src/memory/kernel_mapper.cpp +++ b/arch/x86_64/src/memory/kernel_mapper.cpp @@ -1,15 +1,16 @@ #include "arch/memory/kernel_mapper.hpp" +#include "arch/boot/ld.hpp" + #include "kapi/memory.hpp" #include "kapi/system.hpp" -#include "arch/boot/ld.hpp" +#include <elf/format.hpp> +#include <elf/section_header.hpp> #include <kstd/print> #include <kstd/units> -#include <elf/format.hpp> -#include <elf/section_header.hpp> #include <multiboot2/information.hpp> #include <algorithm> diff --git a/arch/x86_64/src/memory/mmu.cpp b/arch/x86_64/src/memory/mmu.cpp index ea232781..6d185a0a 100644 --- a/arch/x86_64/src/memory/mmu.cpp +++ b/arch/x86_64/src/memory/mmu.cpp @@ -1,9 +1,9 @@ #include "arch/memory/mmu.hpp" -#include "kapi/memory.hpp" - #include "arch/cpu/registers.hpp" +#include "kapi/memory.hpp" + namespace arch::memory { auto tlb_flush(kapi::memory::linear_address address) -> void diff --git a/arch/x86_64/src/vga/text/device.cpp b/arch/x86_64/src/vga/text/device.cpp index dcacd8c3..0ecbef9a 100644 --- a/arch/x86_64/src/vga/text/device.cpp +++ b/arch/x86_64/src/vga/text/device.cpp @@ -1,10 +1,10 @@ -#include "kapi/cio.hpp" - #include "arch/boot/boot.hpp" #include "arch/boot/ld.hpp" #include "arch/vga/crtc.hpp" #include "arch/vga/text.hpp" +#include "kapi/cio.hpp" + #include <bit> #include <cstddef> #include <cstdint> diff --git a/kapi/include/kapi/acpi.hpp b/kapi/include/kapi/acpi.hpp index b607ee0d..885fcde1 100644 --- a/kapi/include/kapi/acpi.hpp +++ b/kapi/include/kapi/acpi.hpp @@ -1,11 +1,11 @@ #ifndef TEACHOS_KAPI_ACPI_HPP #define TEACHOS_KAPI_ACPI_HPP +#include <acpi/acpi.hpp> + #include <kstd/memory> #include <kstd/units> -#include <acpi/acpi.hpp> - #include <string_view> namespace kapi::acpi diff --git a/kapi/include/kapi/filesystem.hpp b/kapi/include/kapi/filesystem.hpp index dba5d54a..db77bdae 100644 --- a/kapi/include/kapi/filesystem.hpp +++ b/kapi/include/kapi/filesystem.hpp @@ -3,6 +3,7 @@ #include <cstddef> #include <string_view> + #include <sys/types.h> namespace kapi::filesystem diff --git a/kernel/include/kernel/acpi/manager.hpp b/kernel/include/kernel/acpi/manager.hpp index 860d6095..1e8c1e85 100644 --- a/kernel/include/kernel/acpi/manager.hpp +++ b/kernel/include/kernel/acpi/manager.hpp @@ -1,12 +1,12 @@ #ifndef TEACHOS_KERNEL_ACPI_MANAGER_HPP #define TEACHOS_KERNEL_ACPI_MANAGER_HPP +#include <acpi/acpi.hpp> + #include <kstd/flat_map> #include <kstd/memory> #include <kstd/vector> -#include <acpi/acpi.hpp> - #include <string_view> namespace kernel::acpi diff --git a/kernel/include/kernel/devices/storage/management.hpp b/kernel/include/kernel/devices/storage/management.hpp index 0176ce10..b2f42d1d 100644 --- a/kernel/include/kernel/devices/storage/management.hpp +++ b/kernel/include/kernel/devices/storage/management.hpp @@ -1,9 +1,10 @@ #ifndef TEACH_OS_KERNEL_DEVICES_STORAGE_MANAGEMENT_HPP #define TEACH_OS_KERNEL_DEVICES_STORAGE_MANAGEMENT_HPP -#include "kapi/devices/device.hpp" #include "kernel/devices/storage/controller.hpp" +#include "kapi/devices/device.hpp" + #include <kstd/memory> #include <kstd/vector> diff --git a/kernel/include/kernel/devices/storage/ram_disk/controller.hpp b/kernel/include/kernel/devices/storage/ram_disk/controller.hpp index ad8b29fe..febec950 100644 --- a/kernel/include/kernel/devices/storage/ram_disk/controller.hpp +++ b/kernel/include/kernel/devices/storage/ram_disk/controller.hpp @@ -1,10 +1,10 @@ #ifndef TEACH_OS_KERNEL_DEVICES_STORAGE_RAM_DISK_CONTROLLER_HPP #define TEACH_OS_KERNEL_DEVICES_STORAGE_RAM_DISK_CONTROLLER_HPP -#include "kapi/boot_module/boot_module_registry.hpp" - #include "kernel/devices/storage/controller.hpp" +#include "kapi/boot_module/boot_module_registry.hpp" + namespace kernel::devices::storage::ram_disk { /** diff --git a/kernel/include/kernel/devices/storage/ram_disk/device.hpp b/kernel/include/kernel/devices/storage/ram_disk/device.hpp index e17416e7..0ee0f8f4 100644 --- a/kernel/include/kernel/devices/storage/ram_disk/device.hpp +++ b/kernel/include/kernel/devices/storage/ram_disk/device.hpp @@ -1,10 +1,10 @@ #ifndef TEACH_OS_KERNEL_DEVICES_STORAGE_RAM_DISK_DEVICE_HPP #define TEACH_OS_KERNEL_DEVICES_STORAGE_RAM_DISK_DEVICE_HPP -#include "kapi/boot_module/boot_module.hpp" - #include "kernel/devices/block_device.hpp" +#include "kapi/boot_module/boot_module.hpp" + #include <cstddef> namespace kernel::devices::storage::ram_disk diff --git a/kernel/include/kernel/filesystem/device_inode.hpp b/kernel/include/kernel/filesystem/device_inode.hpp index c33be2aa..6afe5bc5 100644 --- a/kernel/include/kernel/filesystem/device_inode.hpp +++ b/kernel/include/kernel/filesystem/device_inode.hpp @@ -1,10 +1,10 @@ #ifndef TEACH_OS_KERNEL_FILESYSTEM_DEVICE_INODE_HPP #define TEACH_OS_KERNEL_FILESYSTEM_DEVICE_INODE_HPP -#include "kapi/devices/device.hpp" - #include "kernel/filesystem/inode.hpp" +#include "kapi/devices/device.hpp" + #include <kstd/memory> #include <cstddef> diff --git a/kernel/include/kernel/memory.hpp b/kernel/include/kernel/memory.hpp index f09c5190..568dd246 100644 --- a/kernel/include/kernel/memory.hpp +++ b/kernel/include/kernel/memory.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_KERNEL_MEMORY_HPP #define TEACHOS_KERNEL_MEMORY_HPP -#include "kapi/memory.hpp" - #include "kernel/memory/heap_allocator.hpp" // IWYU pragma: export +#include "kapi/memory.hpp" + namespace kernel::memory { diff --git a/kernel/include/kernel/memory/block_list_allocator.hpp b/kernel/include/kernel/memory/block_list_allocator.hpp index de89f3b2..c2cb468a 100644 --- a/kernel/include/kernel/memory/block_list_allocator.hpp +++ b/kernel/include/kernel/memory/block_list_allocator.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_KERNEL_MEMORY_BLOCK_LIST_ALLOCATOR_HPP #define TEACHOS_KERNEL_MEMORY_BLOCK_LIST_ALLOCATOR_HPP -#include "kapi/memory.hpp" - #include "kernel/memory/heap_allocator.hpp" +#include "kapi/memory.hpp" + #include <kstd/mutex> #include <kstd/units> diff --git a/kernel/include/kernel/test_support/cio.hpp b/kernel/include/kernel/test_support/cio.hpp index f7bac2df..e990825c 100644 --- a/kernel/include/kernel/test_support/cio.hpp +++ b/kernel/include/kernel/test_support/cio.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_KERNEL_TEST_SUPPORT_CIO_HPP #define TEACHOS_KERNEL_TEST_SUPPORT_CIO_HPP -#include "kapi/cio.hpp" - #include "kernel/test_support/log_buffer.hpp" +#include "kapi/cio.hpp" + #include <string_view> namespace kernel::tests::cio diff --git a/kernel/include/kernel/test_support/page_mapper.hpp b/kernel/include/kernel/test_support/page_mapper.hpp index 7ae9a4f0..05f43590 100644 --- a/kernel/include/kernel/test_support/page_mapper.hpp +++ b/kernel/include/kernel/test_support/page_mapper.hpp @@ -1,10 +1,10 @@ #ifndef TEACHOS_KERNEL_TEST_SUPPORT_PAGE_MAPPER_HPP #define TEACHOS_KERNEL_TEST_SUPPORT_PAGE_MAPPER_HPP -#include "kapi/memory.hpp" - #include "kernel/test_support/simulated_memory.hpp" +#include "kapi/memory.hpp" + #include <kstd/units> #include <cstddef> diff --git a/kernel/include/kernel/test_support/simulated_memory.hpp b/kernel/include/kernel/test_support/simulated_memory.hpp index fa78aedf..ef4e3ec4 100644 --- a/kernel/include/kernel/test_support/simulated_memory.hpp +++ b/kernel/include/kernel/test_support/simulated_memory.hpp @@ -6,6 +6,7 @@ #include <kstd/units> #include <cstddef> + #include <sys/types.h> namespace kernel::tests diff --git a/kernel/kapi/acpi.cpp b/kernel/kapi/acpi.cpp index 5a2f227e..fc9ff31e 100644 --- a/kernel/kapi/acpi.cpp +++ b/kernel/kapi/acpi.cpp @@ -1,13 +1,13 @@ #include "kapi/acpi.hpp" -#include "kapi/system.hpp" - #include "kernel/acpi/manager.hpp" -#include <kstd/memory> +#include "kapi/system.hpp" #include <acpi/acpi.hpp> +#include <kstd/memory> + #include <atomic> #include <optional> #include <string_view> diff --git a/kernel/kapi/devices.cpp b/kernel/kapi/devices.cpp index 22503195..53bab8cc 100644 --- a/kernel/kapi/devices.cpp +++ b/kernel/kapi/devices.cpp @@ -1,9 +1,9 @@ #include "kapi/devices.hpp" -#include "kapi/system.hpp" - #include "kernel/devices/root_bus.hpp" +#include "kapi/system.hpp" + #include <kstd/flat_map> #include <kstd/memory> #include <kstd/print> diff --git a/kernel/kapi/filesystem.cpp b/kernel/kapi/filesystem.cpp index d3aa6178..eee3b8bd 100644 --- a/kernel/kapi/filesystem.cpp +++ b/kernel/kapi/filesystem.cpp @@ -8,6 +8,7 @@ #include <cstddef> #include <string_view> + #include <sys/types.h> namespace kapi::filesystem diff --git a/kernel/kapi/memory.cpp b/kernel/kapi/memory.cpp index 31cd1f4d..66ccb9ca 100644 --- a/kernel/kapi/memory.cpp +++ b/kernel/kapi/memory.cpp @@ -1,10 +1,10 @@ #include "kapi/memory.hpp" -#include "kapi/system.hpp" - #include "kernel/memory/bitmap_allocator.hpp" #include "kernel/memory/mmio_allocator.hpp" +#include "kapi/system.hpp" + #include <kstd/print> #include <kstd/units> diff --git a/kernel/kstd/print.cpp b/kernel/kstd/print.cpp index 78540277..a2e7fe77 100644 --- a/kernel/kstd/print.cpp +++ b/kernel/kstd/print.cpp @@ -1,8 +1,9 @@ +#include <kstd/os/print.hpp> + #include "kapi/cio.hpp" #include <kstd/bits/format/output_buffer.hpp> #include <kstd/format> -#include <kstd/os/print.hpp> #include <kstd/print> #include <algorithm> diff --git a/kernel/src/acpi/manager.cpp b/kernel/src/acpi/manager.cpp index 58767992..f17c9cbc 100644 --- a/kernel/src/acpi/manager.cpp +++ b/kernel/src/acpi/manager.cpp @@ -3,11 +3,11 @@ #include "kapi/memory.hpp" #include "kapi/system.hpp" +#include <acpi/acpi.hpp> + #include <kstd/memory> #include <kstd/print> -#include <acpi/acpi.hpp> - #include <algorithm> #include <cstddef> #include <cstdint> diff --git a/kernel/src/devices/block_device_utils.cpp b/kernel/src/devices/block_device_utils.cpp index 59e9b977..3c773086 100644 --- a/kernel/src/devices/block_device_utils.cpp +++ b/kernel/src/devices/block_device_utils.cpp @@ -1,10 +1,10 @@ #include "kernel/devices/block_device_utils.hpp" +#include "kernel/devices/block_device.hpp" + #include "kapi/devices/device.hpp" #include "kapi/system.hpp" -#include "kernel/devices/block_device.hpp" - #include <kstd/cstring> #include <kstd/memory> #include <kstd/vector> diff --git a/kernel/src/devices/storage/management.cpp b/kernel/src/devices/storage/management.cpp index c9fa0a8d..8ff1b06e 100644 --- a/kernel/src/devices/storage/management.cpp +++ b/kernel/src/devices/storage/management.cpp @@ -1,12 +1,12 @@ #include "kernel/devices/storage/management.hpp" +#include "kernel/devices/storage/controller.hpp" +#include "kernel/devices/storage/ram_disk/controller.hpp" + #include "kapi/boot_modules.hpp" #include "kapi/devices/device.hpp" #include "kapi/system.hpp" -#include "kernel/devices/storage/controller.hpp" -#include "kernel/devices/storage/ram_disk/controller.hpp" - #include <kstd/memory> #include <kstd/vector> diff --git a/kernel/src/devices/storage/ram_disk/controller.cpp b/kernel/src/devices/storage/ram_disk/controller.cpp index 040e61f5..d2305336 100644 --- a/kernel/src/devices/storage/ram_disk/controller.cpp +++ b/kernel/src/devices/storage/ram_disk/controller.cpp @@ -1,9 +1,9 @@ #include "kernel/devices/storage/ram_disk/controller.hpp" -#include "kapi/boot_module/boot_module_registry.hpp" - #include "kernel/devices/storage/ram_disk/device.hpp" +#include "kapi/boot_module/boot_module_registry.hpp" + #include <kstd/memory> #include <algorithm> diff --git a/kernel/src/devices/storage/ram_disk/device.cpp b/kernel/src/devices/storage/ram_disk/device.cpp index 8fc3b2ae..c6a13631 100644 --- a/kernel/src/devices/storage/ram_disk/device.cpp +++ b/kernel/src/devices/storage/ram_disk/device.cpp @@ -1,10 +1,10 @@ #include "kernel/devices/storage/ram_disk/device.hpp" +#include "kernel/devices/block_device.hpp" + #include "kapi/boot_module/boot_module.hpp" #include "kapi/system.hpp" -#include "kernel/devices/block_device.hpp" - #include <kstd/cstring> #include <kstd/string> diff --git a/kernel/src/devices/storage/ram_disk/device.tests.cpp b/kernel/src/devices/storage/ram_disk/device.tests.cpp index eacdb04b..b475c4bf 100644 --- a/kernel/src/devices/storage/ram_disk/device.tests.cpp +++ b/kernel/src/devices/storage/ram_disk/device.tests.cpp @@ -3,10 +3,9 @@ #include "kapi/boot_module/boot_module.hpp" #include "kapi/memory.hpp" -#include "catch2/matchers/catch_matchers.hpp" -#include "catch2/matchers/catch_matchers_range_equals.hpp" - #include <catch2/catch_test_macros.hpp> +#include <catch2/matchers/catch_matchers.hpp> +#include <catch2/matchers/catch_matchers_range_equals.hpp> #include <cstddef> #include <ranges> diff --git a/kernel/src/filesystem/dentry.cpp b/kernel/src/filesystem/dentry.cpp index 65910113..af5ceab8 100644 --- a/kernel/src/filesystem/dentry.cpp +++ b/kernel/src/filesystem/dentry.cpp @@ -1,9 +1,9 @@ #include "kernel/filesystem/dentry.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/inode.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <algorithm> diff --git a/kernel/src/filesystem/devfs/filesystem.cpp b/kernel/src/filesystem/devfs/filesystem.cpp index dd60c5d7..76b9489a 100644 --- a/kernel/src/filesystem/devfs/filesystem.cpp +++ b/kernel/src/filesystem/devfs/filesystem.cpp @@ -1,12 +1,12 @@ #include "kernel/filesystem/devfs/filesystem.hpp" -#include "kapi/devices/device.hpp" - #include "kernel/devices/storage/management.hpp" #include "kernel/filesystem/devfs/inode.hpp" #include "kernel/filesystem/device_inode.hpp" #include "kernel/filesystem/inode.hpp" +#include "kapi/devices/device.hpp" + #include <kstd/memory> #include <algorithm> diff --git a/kernel/src/filesystem/device_inode.cpp b/kernel/src/filesystem/device_inode.cpp index 397a0fdd..5793bfcb 100644 --- a/kernel/src/filesystem/device_inode.cpp +++ b/kernel/src/filesystem/device_inode.cpp @@ -1,11 +1,11 @@ #include "kernel/filesystem/device_inode.hpp" -#include "kapi/devices/device.hpp" -#include "kapi/system.hpp" - #include "kernel/devices/block_device_utils.hpp" #include "kernel/filesystem/inode.hpp" +#include "kapi/devices/device.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <cstddef> diff --git a/kernel/src/filesystem/ext2/inode.cpp b/kernel/src/filesystem/ext2/inode.cpp index 07a5525e..6b42db65 100644 --- a/kernel/src/filesystem/ext2/inode.cpp +++ b/kernel/src/filesystem/ext2/inode.cpp @@ -1,10 +1,10 @@ #include "kernel/filesystem/ext2/inode.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/ext2/filesystem.hpp" #include "kernel/filesystem/inode.hpp" +#include "kapi/system.hpp" + #include <algorithm> #include <cstddef> #include <cstdint> diff --git a/kernel/src/filesystem/file_descriptor_table.cpp b/kernel/src/filesystem/file_descriptor_table.cpp index 7569cead..4160429b 100644 --- a/kernel/src/filesystem/file_descriptor_table.cpp +++ b/kernel/src/filesystem/file_descriptor_table.cpp @@ -1,9 +1,9 @@ #include "kernel/filesystem/file_descriptor_table.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/open_file_description.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <algorithm> diff --git a/kernel/src/filesystem/filesystem.cpp b/kernel/src/filesystem/filesystem.cpp index 99e7456d..f9586600 100644 --- a/kernel/src/filesystem/filesystem.cpp +++ b/kernel/src/filesystem/filesystem.cpp @@ -1,10 +1,10 @@ #include "kernel/filesystem/filesystem.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/ext2/filesystem.hpp" #include "kernel/filesystem/inode.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <array> diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp index d1653854..9c8584b7 100644 --- a/kernel/src/filesystem/mount.cpp +++ b/kernel/src/filesystem/mount.cpp @@ -1,10 +1,10 @@ #include "kernel/filesystem/mount.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/dentry.hpp" #include "kernel/filesystem/filesystem.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <kstd/string> @@ -13,8 +13,8 @@ namespace kernel::filesystem { mount::mount(kstd::shared_ptr<dentry> const & mount_dentry, kstd::shared_ptr<dentry> const & root_dentry, - kstd::shared_ptr<filesystem> const & fs, std::string_view mount_path, - kstd::shared_ptr<mount> const & parent_mount) + kstd::shared_ptr<filesystem> const & fs, std::string_view mount_path, + kstd::shared_ptr<mount> const & parent_mount) : m_mount_path(mount_path) , m_mount_dentry(mount_dentry) , m_root_dentry(root_dentry) diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp index 84c8047b..23ced4cd 100644 --- a/kernel/src/filesystem/vfs.cpp +++ b/kernel/src/filesystem/vfs.cpp @@ -1,7 +1,5 @@ #include "kernel/filesystem/vfs.hpp" -#include "kapi/system.hpp" - #include "kernel/filesystem/dentry.hpp" #include "kernel/filesystem/devfs/filesystem.hpp" #include "kernel/filesystem/filesystem.hpp" @@ -9,6 +7,8 @@ #include "kernel/filesystem/mount_table.hpp" #include "kernel/filesystem/rootfs/filesystem.hpp" +#include "kapi/system.hpp" + #include <kstd/memory> #include <optional> diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index aee35790..52cbe2e9 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -1,3 +1,10 @@ +#include "kernel/devices/storage/management.hpp" +#include "kernel/filesystem/device_inode.hpp" +#include "kernel/filesystem/file_descriptor_table.hpp" +#include "kernel/filesystem/open_file_description.hpp" +#include "kernel/filesystem/vfs.hpp" +#include "kernel/memory.hpp" + #include "kapi/boot_modules.hpp" #include "kapi/cio.hpp" #include "kapi/cpu.hpp" @@ -6,13 +13,6 @@ #include "kapi/memory.hpp" #include "kapi/system.hpp" -#include "kernel/devices/storage/management.hpp" -#include "kernel/filesystem/device_inode.hpp" -#include "kernel/filesystem/file_descriptor_table.hpp" -#include "kernel/filesystem/open_file_description.hpp" -#include "kernel/filesystem/vfs.hpp" -#include "kernel/memory.hpp" - #include <kstd/format> #include <kstd/memory> #include <kstd/os/error.hpp> diff --git a/kernel/src/memory.cpp b/kernel/src/memory.cpp index 4a8e203d..b5f65faf 100644 --- a/kernel/src/memory.cpp +++ b/kernel/src/memory.cpp @@ -1,11 +1,11 @@ #include "kernel/memory.hpp" -#include "kapi/memory.hpp" -#include "kapi/system.hpp" - #include "kernel/memory/block_list_allocator.hpp" #include "kernel/memory/heap_allocator.hpp" +#include "kapi/memory.hpp" +#include "kapi/system.hpp" + #include <kstd/print> #include <kstd/units> diff --git a/kernel/src/memory/bitmap_allocator.tests.cpp b/kernel/src/memory/bitmap_allocator.tests.cpp index 56ec0a49..eff6d854 100644 --- a/kernel/src/memory/bitmap_allocator.tests.cpp +++ b/kernel/src/memory/bitmap_allocator.tests.cpp @@ -4,7 +4,6 @@ #include "catch2/matchers/catch_matchers.hpp" #include "catch2/matchers/catch_matchers_range_equals.hpp" - #include <catch2/catch_test_macros.hpp> #include <cstdint> diff --git a/kernel/src/memory/block_list_allocator.cpp b/kernel/src/memory/block_list_allocator.cpp index fbc5945d..5c416fa8 100644 --- a/kernel/src/memory/block_list_allocator.cpp +++ b/kernel/src/memory/block_list_allocator.cpp @@ -1,10 +1,10 @@ #include "kernel/memory/block_list_allocator.hpp" +#include "kernel/memory/heap_allocator.hpp" + #include "kapi/memory.hpp" #include "kapi/system.hpp" -#include "kernel/memory/heap_allocator.hpp" - #include <kstd/mutex> #include <kstd/units> diff --git a/kernel/src/memory/block_list_allocator.tests.cpp b/kernel/src/memory/block_list_allocator.tests.cpp index 0571441e..fccdad58 100644 --- a/kernel/src/memory/block_list_allocator.tests.cpp +++ b/kernel/src/memory/block_list_allocator.tests.cpp @@ -1,9 +1,9 @@ #include "kernel/memory/block_list_allocator.hpp" -#include "kapi/memory.hpp" - #include "kernel/test_support/memory.hpp" +#include "kapi/memory.hpp" + #include <kstd/units> #include <catch2/catch_test_macros.hpp> diff --git a/kernel/src/memory/operators.cpp b/kernel/src/memory/operators.cpp index 25b5f243..dd3b4fa4 100644 --- a/kernel/src/memory/operators.cpp +++ b/kernel/src/memory/operators.cpp @@ -1,7 +1,7 @@ -#include "kapi/system.hpp" - #include "kernel/memory.hpp" +#include "kapi/system.hpp" + #include <kstd/units> #include <cstddef> diff --git a/kernel/src/test_support/filesystem/storage_boot_module_fixture.cpp b/kernel/src/test_support/filesystem/storage_boot_module_fixture.cpp index cd8360b1..7fa2cb86 100644 --- a/kernel/src/test_support/filesystem/storage_boot_module_fixture.cpp +++ b/kernel/src/test_support/filesystem/storage_boot_module_fixture.cpp @@ -1,25 +1,26 @@ #include "kernel/test_support/filesystem/storage_boot_module_fixture.hpp" -#include "kapi/boot_module/boot_module.hpp" -#include "kapi/boot_modules.hpp" -#include "kapi/memory.hpp" - #include "kernel/devices/storage/management.hpp" #include "kernel/test_support/boot_modules.hpp" #include "kernel/test_support/devices/storage/management.hpp" +#include "kapi/boot_module/boot_module.hpp" +#include "kapi/boot_modules.hpp" +#include "kapi/memory.hpp" + #include <cstddef> #include <fcntl.h> #include <filesystem> #include <format> #include <stdexcept> #include <string> -#include <sys/mman.h> -#include <sys/stat.h> #include <unistd.h> #include <utility> #include <vector> +#include <sys/mman.h> +#include <sys/stat.h> + namespace kernel::tests::filesystem { storage_boot_module_fixture::mapped_image::mapped_image(std::filesystem::path path) diff --git a/kernel/src/test_support/kapi/cio.cpp b/kernel/src/test_support/kapi/cio.cpp index 4a1cd1f6..5cdd4628 100644 --- a/kernel/src/test_support/kapi/cio.cpp +++ b/kernel/src/test_support/kapi/cio.cpp @@ -1,9 +1,9 @@ #include "kernel/test_support/cio.hpp" -#include <kapi/cio.hpp> - #include "kernel/test_support/log_buffer.hpp" +#include <kapi/cio.hpp> + #include <atomic> #include <optional> #include <stdexcept> diff --git a/kernel/src/test_support/kapi/memory.cpp b/kernel/src/test_support/kapi/memory.cpp index e926ba6c..3b4a1bd4 100644 --- a/kernel/src/test_support/kapi/memory.cpp +++ b/kernel/src/test_support/kapi/memory.cpp @@ -1,10 +1,10 @@ #include "kapi/memory.hpp" -#include <kapi/memory.hpp> - #include "kernel/test_support/bump_frame_allocator.hpp" #include "kernel/test_support/page_mapper.hpp" +#include <kapi/memory.hpp> + #include <kstd/units> #include <optional> diff --git a/kernel/src/test_support/output_device.cpp b/kernel/src/test_support/output_device.cpp index 83dcbcc9..505e385b 100644 --- a/kernel/src/test_support/output_device.cpp +++ b/kernel/src/test_support/output_device.cpp @@ -1,8 +1,8 @@ -#include "kapi/cio.hpp" - #include "kernel/test_support/cio.hpp" #include "kernel/test_support/log_buffer.hpp" +#include "kapi/cio.hpp" + #include <iostream> #include <string> #include <string_view> diff --git a/kernel/src/test_support/simulated_memory.cpp b/kernel/src/test_support/simulated_memory.cpp index 03dac1d4..2a4f15ba 100644 --- a/kernel/src/test_support/simulated_memory.cpp +++ b/kernel/src/test_support/simulated_memory.cpp @@ -9,9 +9,10 @@ #include <cstring> #include <format> #include <stdexcept> +#include <unistd.h> + #include <sys/mman.h> #include <sys/types.h> -#include <unistd.h> namespace kernel::tests { diff --git a/kernel/src/test_support/state_reset_listener.cpp b/kernel/src/test_support/state_reset_listener.cpp index 9120c890..19677439 100644 --- a/kernel/src/test_support/state_reset_listener.cpp +++ b/kernel/src/test_support/state_reset_listener.cpp @@ -1,7 +1,3 @@ -#include "kapi/cio.hpp" -#include "kapi/cpu.hpp" -#include "kapi/memory.hpp" - #include "kernel/filesystem/file_descriptor_table.hpp" #include "kernel/test_support/boot_modules.hpp" #include "kernel/test_support/cio.hpp" @@ -11,6 +7,10 @@ #include "kernel/test_support/filesystem/vfs.hpp" #include "kernel/test_support/memory.hpp" +#include "kapi/cio.hpp" +#include "kapi/cpu.hpp" +#include "kapi/memory.hpp" + #include <catch2/catch_test_case_info.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/reporters/catch_reporter_event_listener.hpp> diff --git a/libs/acpi/acpi/common/table_header.cpp b/libs/acpi/acpi/common/table_header.cpp index c69ff5d9..6a7a4dc3 100644 --- a/libs/acpi/acpi/common/table_header.cpp +++ b/libs/acpi/acpi/common/table_header.cpp @@ -1,8 +1,8 @@ +#include <acpi/common/table_header.hpp> + #include <kstd/cstring> #include <kstd/units> -#include <acpi/common/table_header.hpp> - #include <array> #include <cstddef> #include <cstdint> diff --git a/libs/acpi/acpi/common/table_header.test.cpp b/libs/acpi/acpi/common/table_header.test.cpp index d6976b3e..53cdb265 100644 --- a/libs/acpi/acpi/common/table_header.test.cpp +++ b/libs/acpi/acpi/common/table_header.test.cpp @@ -1,7 +1,9 @@ +#include <acpi/common/table_header.hpp> + #include <kstd/units> -#include <acpi/common/table_header.hpp> #include <catch2/catch_test_macros.hpp> + #include <test_data/tables.hpp> SCENARIO("Common table header parsing", "[common_table_header]") diff --git a/libs/acpi/acpi/data/madt.cpp b/libs/acpi/acpi/data/madt.cpp index a8d47412..1a8b6d3a 100644 --- a/libs/acpi/acpi/data/madt.cpp +++ b/libs/acpi/acpi/data/madt.cpp @@ -1,7 +1,7 @@ -#include <kstd/cstring> - #include <acpi/data/madt.hpp> +#include <kstd/cstring> + #include <bit> #include <cstddef> #include <cstdint> diff --git a/libs/acpi/acpi/data/madt.hpp b/libs/acpi/acpi/data/madt.hpp index 83078260..b76daa4f 100644 --- a/libs/acpi/acpi/data/madt.hpp +++ b/libs/acpi/acpi/data/madt.hpp @@ -3,14 +3,14 @@ // IWYU pragma: private, include <acpi/acpi.hpp> -#include <kstd/ext/bitfield_enum> -#include <kstd/os/error.hpp> -#include <kstd/units> - #include <acpi/common/table_signature.hpp> #include <acpi/common/table_type.hpp> #include <acpi/common/vla_table.hpp> +#include <kstd/ext/bitfield_enum> +#include <kstd/os/error.hpp> +#include <kstd/units> + #include <array> #include <cstddef> #include <cstdint> diff --git a/libs/acpi/acpi/data/madt.test.cpp b/libs/acpi/acpi/data/madt.test.cpp index 6795499d..5d3b3660 100644 --- a/libs/acpi/acpi/data/madt.test.cpp +++ b/libs/acpi/acpi/data/madt.test.cpp @@ -1,11 +1,13 @@ +#include <acpi/data/madt.hpp> + #include <kstd/units> -#include <acpi/data/madt.hpp> #include <catch2/catch_test_macros.hpp> -#include <test_data/tables.hpp> #include <iterator> +#include <test_data/tables.hpp> + SCENARIO("MADT parsing", "[madt]") { GIVEN("The basic compiled MADT containing a single LAPIC entry and the default x86 LAPIC address") diff --git a/libs/acpi/acpi/data/rsdt.cpp b/libs/acpi/acpi/data/rsdt.cpp index fe108c7c..80e209db 100644 --- a/libs/acpi/acpi/data/rsdt.cpp +++ b/libs/acpi/acpi/data/rsdt.cpp @@ -1,7 +1,8 @@ -#include <kstd/cstring> +#include <acpi/data/rsdt.hpp> #include <acpi/common/table_header.hpp> -#include <acpi/data/rsdt.hpp> + +#include <kstd/cstring> #include <cstddef> #include <cstdint> diff --git a/libs/acpi/acpi/data/rsdt.test.cpp b/libs/acpi/acpi/data/rsdt.test.cpp index 937dce08..a6dd4160 100644 --- a/libs/acpi/acpi/data/rsdt.test.cpp +++ b/libs/acpi/acpi/data/rsdt.test.cpp @@ -1,12 +1,15 @@ -#include <kstd/units> +#include <acpi/data/rsdt.hpp> #include <acpi/acpi.hpp> -#include <acpi/data/rsdt.hpp> + +#include <kstd/units> + #include <catch2/catch_test_macros.hpp> -#include <test_data/tables.hpp> #include <iterator> +#include <test_data/tables.hpp> + SCENARIO("RSDT parsing", "[rsdt]") { GIVEN("The basic compiled RSDT containing 8 table pointers") diff --git a/libs/acpi/acpi/data/xsdt.cpp b/libs/acpi/acpi/data/xsdt.cpp index b4202b8c..b77aeab7 100644 --- a/libs/acpi/acpi/data/xsdt.cpp +++ b/libs/acpi/acpi/data/xsdt.cpp @@ -1,7 +1,8 @@ -#include <kstd/cstring> +#include <acpi/data/xsdt.hpp> #include <acpi/common/table_header.hpp> -#include <acpi/data/xsdt.hpp> + +#include <kstd/cstring> #include <cstddef> #include <cstdint> diff --git a/libs/acpi/acpi/data/xsdt.test.cpp b/libs/acpi/acpi/data/xsdt.test.cpp index 7fb564c8..cc18a668 100644 --- a/libs/acpi/acpi/data/xsdt.test.cpp +++ b/libs/acpi/acpi/data/xsdt.test.cpp @@ -1,12 +1,15 @@ -#include <kstd/units> +#include <acpi/data/xsdt.hpp> #include <acpi/acpi.hpp> -#include <acpi/data/xsdt.hpp> + +#include <kstd/units> + #include <catch2/catch_test_macros.hpp> -#include <test_data/tables.hpp> #include <iterator> +#include <test_data/tables.hpp> + SCENARIO("XSDT parsing", "[xsdt]") { GIVEN("The basic compiled XSDT containing 8 table pointers") diff --git a/libs/acpi/acpi/pointers.cpp b/libs/acpi/acpi/pointers.cpp index 45a42ce7..2ac8d319 100644 --- a/libs/acpi/acpi/pointers.cpp +++ b/libs/acpi/acpi/pointers.cpp @@ -1,7 +1,8 @@ -#include <kstd/units> +#include <acpi/pointers.hpp> #include <acpi/common/checksum.hpp> -#include <acpi/pointers.hpp> + +#include <kstd/units> #include <bit> #include <cstddef> diff --git a/libs/acpi/acpi/pointers.test.cpp b/libs/acpi/acpi/pointers.test.cpp index 06ce1a43..d7b700d6 100644 --- a/libs/acpi/acpi/pointers.test.cpp +++ b/libs/acpi/acpi/pointers.test.cpp @@ -1,4 +1,5 @@ #include <acpi/pointers.hpp> + #include <catch2/catch_test_macros.hpp> #include <array> diff --git a/libs/kstd/include/kstd/bits/format/context.hpp b/libs/kstd/include/kstd/bits/format/context.hpp index 7f392a05..1883fc82 100644 --- a/libs/kstd/include/kstd/bits/format/context.hpp +++ b/libs/kstd/include/kstd/bits/format/context.hpp @@ -3,9 +3,8 @@ // IWYU pragma: private, include <kstd/format> -#include "arg.hpp" +#include "kstd/bits/format/arg.hpp" #include "kstd/bits/format/output_buffer.hpp" - #include <kstd/os/error.hpp> #include <concepts> diff --git a/libs/kstd/include/kstd/stack b/libs/kstd/include/kstd/stack index 97503760..77e6bfd3 100644 --- a/libs/kstd/include/kstd/stack +++ b/libs/kstd/include/kstd/stack @@ -2,6 +2,7 @@ #define KSTD_STACK_HPP #include "kstd/vector" + #include <initializer_list> #include <utility> diff --git a/libs/kstd/include/kstd/string b/libs/kstd/include/kstd/string index 58c4a089..e228a04c 100644 --- a/libs/kstd/include/kstd/string +++ b/libs/kstd/include/kstd/string @@ -1,10 +1,9 @@ #ifndef KSTD_STRING_HPP #define KSTD_STRING_HPP -#include "kstd/bits/format/context.hpp" -#include "kstd/bits/format/formatter.hpp" -#include "kstd/bits/format/formatter/string_view.hpp" - +#include <kstd/bits/format/context.hpp> +#include <kstd/bits/format/formatter.hpp> +#include <kstd/bits/format/formatter/string_view.hpp> #include <kstd/cstring> #include <kstd/os/error.hpp> #include <kstd/vector> diff --git a/libs/kstd/include/kstd/units b/libs/kstd/include/kstd/units index bc7e1b9d..df5eb374 100644 --- a/libs/kstd/include/kstd/units +++ b/libs/kstd/include/kstd/units @@ -15,9 +15,8 @@ namespace kstd using value_type = ValueType; constexpr basic_unit() noexcept - : value{} - { - } + : value{} + {} explicit constexpr basic_unit(value_type value) noexcept : value{value} diff --git a/libs/kstd/tests/src/flat_map.cpp b/libs/kstd/tests/src/flat_map.cpp index eb599af8..2b793d99 100644 --- a/libs/kstd/tests/src/flat_map.cpp +++ b/libs/kstd/tests/src/flat_map.cpp @@ -1,4 +1,5 @@ #include <kstd/flat_map> + #include <kstd/tests/os_panic.hpp> #include <catch2/catch_test_macros.hpp> diff --git a/libs/kstd/tests/src/vector.cpp b/libs/kstd/tests/src/vector.cpp index 97460b49..415ca8e2 100644 --- a/libs/kstd/tests/src/vector.cpp +++ b/libs/kstd/tests/src/vector.cpp @@ -1,8 +1,8 @@ -#include "kstd/tests/os_panic.hpp" +#include <kstd/vector> +#include "kstd/tests/os_panic.hpp" #include <kstd/ranges> #include <kstd/tests/test_types.hpp> -#include <kstd/vector> #include <catch2/catch_test_macros.hpp> diff --git a/libs/multiboot2/multiboot2/information.hpp b/libs/multiboot2/multiboot2/information.hpp index a2ded56b..5f75fc8c 100644 --- a/libs/multiboot2/multiboot2/information.hpp +++ b/libs/multiboot2/multiboot2/information.hpp @@ -1,14 +1,14 @@ #ifndef MULTIBOOT2_INFORMATION_HPP #define MULTIBOOT2_INFORMATION_HPP -#include "information/data.hpp" // IWYU pragma: export -#include "information/iterator.hpp" // IWYU pragma: export -#include "information/tag.hpp" // IWYU pragma: export +#include <elf/format.hpp> +#include <elf/section_header.hpp> #include <kstd/units> -#include <elf/format.hpp> -#include <elf/section_header.hpp> +#include "multiboot2/information/data.hpp" // IWYU pragma: export +#include "multiboot2/information/iterator.hpp" // IWYU pragma: export +#include "multiboot2/information/tag.hpp" // IWYU pragma: export #include <algorithm> #include <cstddef> @@ -129,7 +129,7 @@ namespace multiboot2 return kstd::units::bytes{end_address - start_address}; } }; - + struct acpi_rsdp : vla_tag<data::acpi_rsdp, std::byte, std::span> { using vla_tag::vla_tag; diff --git a/libs/multiboot2/multiboot2/information/data.hpp b/libs/multiboot2/multiboot2/information/data.hpp index 315eb393..531e2f31 100644 --- a/libs/multiboot2/multiboot2/information/data.hpp +++ b/libs/multiboot2/multiboot2/information/data.hpp @@ -3,11 +3,11 @@ // IWYU pragma: private, include <multiboot2/information.hpp> +#include <kstd/units> + #include "multiboot2/constants/information_id.hpp" #include "multiboot2/constants/memory_type.hpp" -#include <kstd/units> - #include <cstdint> namespace multiboot2 diff --git a/libs/multiboot2/multiboot2/information/iterator.hpp b/libs/multiboot2/multiboot2/information/iterator.hpp index 62c267db..ec0f4a2a 100644 --- a/libs/multiboot2/multiboot2/information/iterator.hpp +++ b/libs/multiboot2/multiboot2/information/iterator.hpp @@ -4,7 +4,7 @@ // IWYU pragma: private, include <multiboot2/information.hpp> #include "multiboot2/constants/information_id.hpp" -#include "tag.hpp" +#include "multiboot2/information/tag.hpp" #include <cstddef> #include <iterator> |
