From 8b27051f4817815ad55e4bcbb570773f2037910c Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Oct 2022 03:49:46 +0300 Subject: [PATCH] Added CurrentProcess & CurrentThread to the CPU data --- include/smp.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/smp.hpp b/include/smp.hpp index f3597fd..3766e1e 100644 --- a/include/smp.hpp +++ b/include/smp.hpp @@ -2,6 +2,7 @@ #define __FENNIX_KERNEL_SMP_H__ #include +#include /** @brief Maximum supported number of CPU cores by the kernel */ #define MAX_CPU 256 @@ -31,6 +32,12 @@ struct CPUData long ErrorCode; /** @brief Is CPU online? */ bool IsActive; + + /** @brief Current running process */ + Tasking::PCB *CurrentProcess; + /** @brief Current running thread */ + Tasking::TCB *CurrentThread; + /** @brief Architecture-specific CPU data. */ CPUArchData *Data; /** @brief Checksum. Used to verify the integrity of the data. Must be equal to CPU_DATA_CHECKSUM (0xC0FFEE). */