aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/pre/src/context_switching/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/pre/src/context_switching/main.cpp')
-rw-r--r--arch/x86_64/pre/src/context_switching/main.cpp13
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)
{