mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
Kernel/aarch64: Implement Processor::{clear,restore}_critical()
This commit is contained in:
parent
993b7495ba
commit
fbfe669f6d
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/fbfe669f6d Pull-request: https://github.com/SerenityOS/serenity/pull/16690 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/nico ✅
@ -11,6 +11,7 @@
|
||||
#include <Kernel/Arch/TrapFrame.h>
|
||||
#include <Kernel/Arch/aarch64/ASM_wrapper.h>
|
||||
#include <Kernel/Arch/aarch64/CPU.h>
|
||||
#include <Kernel/InterruptDisabler.h>
|
||||
#include <Kernel/Scheduler.h>
|
||||
#include <Kernel/Thread.h>
|
||||
#include <Kernel/Time/TimeManagement.h>
|
||||
@ -60,7 +61,13 @@ void Processor::flush_tlb(Memory::PageDirectory const*, VirtualAddress vaddr, si
|
||||
|
||||
u32 Processor::clear_critical()
|
||||
{
|
||||
TODO_AARCH64();
|
||||
InterruptDisabler disabler;
|
||||
auto prev_critical = in_critical();
|
||||
auto& proc = current();
|
||||
proc.m_in_critical = 0;
|
||||
if (proc.m_in_irq == 0)
|
||||
proc.check_invoke_scheduler();
|
||||
return prev_critical;
|
||||
}
|
||||
|
||||
u32 Processor::smp_wake_n_idle_processors(u32 wake_count)
|
||||
|
@ -192,8 +192,7 @@ public:
|
||||
|
||||
ALWAYS_INLINE static void restore_critical(u32 prev_critical)
|
||||
{
|
||||
(void)prev_critical;
|
||||
TODO_AARCH64();
|
||||
current().m_in_critical = prev_critical;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static u32 in_critical()
|
||||
|
Loading…
Reference in New Issue
Block a user