From ea89b9267520ee693a8a35b48ce114ee441d8bf6 Mon Sep 17 00:00:00 2001 From: apio Date: Thu, 5 Jan 2023 21:50:53 +0100 Subject: [PATCH] Store a bit more stuff in a thread :) --- kernel/src/thread/Thread.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/src/thread/Thread.h b/kernel/src/thread/Thread.h index 43a94e5d..3b37923a 100644 --- a/kernel/src/thread/Thread.h +++ b/kernel/src/thread/Thread.h @@ -1,5 +1,6 @@ #pragma once +#include "arch/MMU.h" #include #include #include @@ -32,9 +33,14 @@ struct Thread : public LinkedListNode u64 sleep_ticks_left; Stack stack; + Stack kernel_stack; ThreadState state = ThreadState::Runnable; + bool is_kernel { true }; + + PageDirectory* directory; + bool is_idle() { return state == ThreadState::Idle;