diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-11-24 13:25:12 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-11-24 13:25:12 +0100 |
| commit | 2b3dca0d0329b61881ffbecca0f120cfda3314fa (patch) | |
| tree | 15f6b50123d6c3ad5dc5e43b56a9897f4170a89d /arch | |
| parent | 9ee028e52bd60affded3b90ea8dcd20c93bb5025 (diff) | |
| download | teachos-2b3dca0d0329b61881ffbecca0f120cfda3314fa.tar.xz teachos-2b3dca0d0329b61881ffbecca0f120cfda3314fa.zip | |
x86_64/kapi: clean up one linter warning
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/src/kapi/memory.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86_64/src/kapi/memory.cpp b/arch/x86_64/src/kapi/memory.cpp index d0d966b..5142a2a 100644 --- a/arch/x86_64/src/kapi/memory.cpp +++ b/arch/x86_64/src/kapi/memory.cpp @@ -19,10 +19,8 @@ namespace teachos::memory namespace { - // NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables) - auto constinit is_initialized = std::atomic_flag{}; + // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) auto constinit allocator = static_cast<frame_allocator *>(nullptr); - // NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables) auto create_memory_information() -> x86_64::region_allocator::memory_information { @@ -65,6 +63,7 @@ namespace teachos::memory auto init() -> void { + auto static constinit is_initialized = std::atomic_flag{}; if (is_initialized.test_and_set()) { system::panic("[x86_64] Memory management has already been initialized."); |
