From fb790b07aeba8e22e4190cf3e1834d11ecde6c96 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:08:33 +0200 Subject: dev: better .clang-format, ran format command. Signed-off-by: Amlal --- dev/kernel/HALKit/ARM64/HalKernelMain.cc | 84 +++++++++++++++----------------- 1 file changed, 39 insertions(+), 45 deletions(-) (limited to 'dev/kernel/HALKit/ARM64/HalKernelMain.cc') diff --git a/dev/kernel/HALKit/ARM64/HalKernelMain.cc b/dev/kernel/HALKit/ARM64/HalKernelMain.cc index 3498d477..3e6701ea 100644 --- a/dev/kernel/HALKit/ARM64/HalKernelMain.cc +++ b/dev/kernel/HALKit/ARM64/HalKernelMain.cc @@ -1,77 +1,71 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #include -#include +#include #include +#include +#include #include #include #include #include +#include #include -#include #include -#include -#include -#include +#include #include -EXTERN_C void hal_init_platform( - Kernel::HEL::BootInfoHeader* handover_hdr) -{ - - /************************************************** */ - /* INITIALIZE AND VALIDATE HEADER. */ - /************************************************** */ +EXTERN_C void hal_init_platform(Kernel::HEL::BootInfoHeader* handover_hdr) { + /************************************************** */ + /* INITIALIZE AND VALIDATE HEADER. */ + /************************************************** */ - kHandoverHeader = handover_hdr; + kHandoverHeader = handover_hdr; - if (kHandoverHeader->f_Magic != kHandoverMagic && - kHandoverHeader->f_Version != kHandoverVersion) - { - return; - } + if (kHandoverHeader->f_Magic != kHandoverMagic && + kHandoverHeader->f_Version != kHandoverVersion) { + return; + } - /************************************** */ - /* INITIALIZE BIT MAP. */ - /************************************** */ + /************************************** */ + /* INITIALIZE BIT MAP. */ + /************************************** */ - kKernelBitMpSize = kHandoverHeader->f_BitMapSize; - kKernelBitMpStart = reinterpret_cast( - reinterpret_cast(kHandoverHeader->f_BitMapStart)); + kKernelBitMpSize = kHandoverHeader->f_BitMapSize; + kKernelBitMpStart = reinterpret_cast( + reinterpret_cast(kHandoverHeader->f_BitMapStart)); - /// @note do initialize the interrupts after it. + /// @note do initialize the interrupts after it. - Kernel::mp_initialize_gic(); + Kernel::mp_initialize_gic(); - /// after the scheduler runs, we must look over teams, every 5000s in order to schedule every process according to their affinity fairly. + /// after the scheduler runs, we must look over teams, every 5000s in order to schedule every + /// process according to their affinity fairly. - auto constexpr kSchedTeamSwitchMS = 5U; /// @brief Team switch time in milliseconds. + auto constexpr kSchedTeamSwitchMS = 5U; /// @brief Team switch time in milliseconds. - Kernel::HardwareTimer timer(rtl_milliseconds(kSchedTeamSwitchMS)); + Kernel::HardwareTimer timer(rtl_milliseconds(kSchedTeamSwitchMS)); - STATIC Kernel::Array kTeams; + STATIC Kernel::Array kTeams; - SizeT team_index = 0U; + SizeT team_index = 0U; - /// @brief This just loops over the teams and switches between them. - /// @details Not even round-robin, just a simple loop in this boot core we're at. - while (YES) - { - if (team_index > (kSchedTeamCount - 1)) - { - team_index = 0U; - } + /// @brief This just loops over the teams and switches between them. + /// @details Not even round-robin, just a simple loop in this boot core we're at. + while (YES) { + if (team_index > (kSchedTeamCount - 1)) { + team_index = 0U; + } - while (!UserProcessScheduler::The().SwitchTeam(kTeams[team_index])) - ; + while (!UserProcessScheduler::The().SwitchTeam(kTeams[team_index])); - timer.Wait(); + timer.Wait(); - ++team_index; - } + ++team_index; + } } -- cgit v1.2.3