From 65254486efff0fd1bb78a48ff90b7713a5ce539f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 29 Jan 2024 18:17:47 +0100 Subject: Kernel: Update TODO. Src: Refactorings according to clang-format. Meta: Update specification. Public: Remove useless UIKit. Signed-off-by: Amlal El Mahrouss --- Private/HALKit/AMD64/HardwareAPIC.cpp | 62 ++++++++++++++++------------------- 1 file changed, 29 insertions(+), 33 deletions(-) (limited to 'Private/HALKit/AMD64/HardwareAPIC.cpp') diff --git a/Private/HALKit/AMD64/HardwareAPIC.cpp b/Private/HALKit/AMD64/HardwareAPIC.cpp index f78cfe3b..9a058eae 100644 --- a/Private/HALKit/AMD64/HardwareAPIC.cpp +++ b/Private/HALKit/AMD64/HardwareAPIC.cpp @@ -11,36 +11,32 @@ // bugs = 0 -namespace hCore -{ - // @brief wakes up thread. - // wakes up thread from hang. - void rt_wakeup_thread(HAL::StackFrame* stack) - { - __asm__ volatile ("cli"); - - stack->Rbp = stack->R15; - stack->Rsi = stack->Rbp; - - __asm__ volatile ("sti"); - } - - static void __rt_hang_proc(void) - { - while (1) - ; - } - - // @brief makes thread sleep. - // hooks and hangs thread to prevent code from executing. - void rt_hang_thread(HAL::StackFrame* stack) - { - __asm__ volatile ("cli"); - - stack->R15 = stack->Rbp; - stack->Rbp = (HAL::Reg)&__rt_hang_proc; - stack->Rsp = stack->Rbp; - - __asm__ volatile ("sti"); - } -} \ No newline at end of file +namespace hCore { +// @brief wakes up thread. +// wakes up thread from hang. +void rt_wakeup_thread(HAL::StackFrame* stack) { + __asm__ volatile("cli"); + + stack->Rbp = stack->R15; + stack->Rsi = stack->Rbp; + + __asm__ volatile("sti"); +} + +static void __rt_hang_proc(void) { + while (1) + ; +} + +// @brief makes thread sleep. +// hooks and hangs thread to prevent code from executing. +void rt_hang_thread(HAL::StackFrame* stack) { + __asm__ volatile("cli"); + + stack->R15 = stack->Rbp; + stack->Rbp = (HAL::Reg)&__rt_hang_proc; + stack->Rsp = stack->Rbp; + + __asm__ volatile("sti"); +} +} // namespace hCore -- cgit v1.2.3