diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-01-16 13:36:38 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-01-16 13:36:38 +0100 |
| commit | 7d6f0ed063790042a808f4bf07c50d308b3f2de4 (patch) | |
| tree | 1a2e1c4ed7e2f3d8e6cdcfb012e554d1a4eb1e5a /arch/x86_64/src/boot | |
| parent | 9750405757396d006ab6992fb93baf414b3e2ae8 (diff) | |
| download | teachos-7d6f0ed063790042a808f4bf07c50d308b3f2de4.tar.xz teachos-7d6f0ed063790042a808f4bf07c50d308b3f2de4.zip | |
chore: restructure namespaces
Diffstat (limited to 'arch/x86_64/src/boot')
| -rw-r--r-- | arch/x86_64/src/boot/boot32.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/src/boot/initialize_runtime.cpp | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/arch/x86_64/src/boot/boot32.S b/arch/x86_64/src/boot/boot32.S index 0e164e2..056cd8e 100644 --- a/arch/x86_64/src/boot/boot32.S +++ b/arch/x86_64/src/boot/boot32.S @@ -1,4 +1,4 @@ -#include "x86_64/boot/boot.hpp" +#include "arch/boot/boot.hpp" /** * @brief Uninitialized data for the bootstrapping process. diff --git a/arch/x86_64/src/boot/initialize_runtime.cpp b/arch/x86_64/src/boot/initialize_runtime.cpp index f413448..b08c13c 100644 --- a/arch/x86_64/src/boot/initialize_runtime.cpp +++ b/arch/x86_64/src/boot/initialize_runtime.cpp @@ -2,16 +2,21 @@ #include <functional> #include <span> -extern "C" +namespace arch::boot { - using global_initializer = auto (*)() -> void; - extern global_initializer __init_array_start; - extern global_initializer __init_array_end; - - auto invoke_global_constructors() -> void + extern "C" { - auto initializers = std::span{&__init_array_start, &__init_array_end}; - std::ranges::for_each(initializers, [](auto invokable) { std::invoke(invokable); }); + using global_initializer = auto (*)() -> void; + + extern global_initializer __init_array_start; + extern global_initializer __init_array_end; + + auto invoke_global_constructors() -> void + { + auto initializers = std::span{&__init_array_start, &__init_array_end}; + std::ranges::for_each(initializers, [](auto invokable) { std::invoke(invokable); }); + } } -} + +} // namespace arch::boot
\ No newline at end of file |
