diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-10-29 15:01:43 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-10-29 15:01:43 +0100 |
| commit | b157e2c472d8bd67ac1656404a6a6ee821260f4b (patch) | |
| tree | 9c4ebaee21c9ad3521f86c543dc1f29906305baa /arch/x86_64/pre/src/context_switching/main.cpp | |
| parent | c2b0bdfe3b725166f16c742cdaca7969052df382 (diff) | |
| download | kernel-b157e2c472d8bd67ac1656404a6a6ee821260f4b.tar.xz kernel-b157e2c472d8bd67ac1656404a6a6ee821260f4b.zip | |
chore: reformat source code
Diffstat (limited to 'arch/x86_64/pre/src/context_switching/main.cpp')
| -rw-r--r-- | arch/x86_64/pre/src/context_switching/main.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86_64/pre/src/context_switching/main.cpp b/arch/x86_64/pre/src/context_switching/main.cpp index 9539428..3eb6dae 100644 --- a/arch/x86_64/pre/src/context_switching/main.cpp +++ b/arch/x86_64/pre/src/context_switching/main.cpp @@ -13,20 +13,23 @@ namespace teachos::arch::context_switching namespace { constexpr interrupt_descriptor_table::segment_selector KERNEL_CODE_SEGMENT_SELECTOR{ - 1U, interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_KERNEL}; + 1U, interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_KERNEL}; constexpr kernel::cpu::far_pointer KERNEL_CODE_POINTER{&kernel::cpu::reload_data_segment_registers, KERNEL_CODE_SEGMENT_SELECTOR}; constexpr context_switching::interrupt_descriptor_table::segment_selector USER_CODE_SEGMENT_SELECTOR{ - 3U, context_switching::interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_USER}; + 3U, context_switching::interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_USER}; constexpr context_switching::interrupt_descriptor_table::segment_selector USER_DATA_SEGMENT_SELECTOR{ - 4U, context_switching::interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_USER}; + 4U, context_switching::interrupt_descriptor_table::segment_selector::REQUEST_LEVEL_USER}; - auto reload_gdtr() -> void { kernel::cpu::call(KERNEL_CODE_POINTER); } + auto reload_gdtr() -> void + { + kernel::cpu::call(KERNEL_CODE_POINTER); + } } // namespace auto initialize_descriptor_tables() -> descriptor_tables { - static bool initalized = false; + bool static initalized = false; if (!initalized) { |
