From 668024177389ee4c083a851f9f50f2f6f444d357 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 17 Oct 2022 13:53:41 +0200 Subject: [PATCH] Kernel/aarch64: Add implementation for Processor::current_in_irq --- Kernel/Arch/aarch64/Processor.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index 7cbdd72862..18890320dc 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2021, James Mintram + * Copyright (c) 2022, Timon Kruiper * * SPDX-License-Identifier: BSD-2-Clause */ @@ -103,8 +104,7 @@ public: ALWAYS_INLINE static FlatPtr current_in_irq() { - TODO_AARCH64(); - return 0; + return current().m_in_irq; } ALWAYS_INLINE static u64 read_cpu_counter() @@ -186,6 +186,10 @@ public: private: u32 m_in_critical { 0 }; + + // FIXME: Once there is code in place to differentiate IRQs from synchronous exceptions (syscalls), + // this member should be incremented. Also this member shouldn't be a FlatPtr. + FlatPtr m_in_irq { 0 }; }; }