Store a bit more stuff in a thread :)

This commit is contained in:
apio 2023-01-05 21:50:53 +01:00
parent 31ea030c7f
commit ea89b92675
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "arch/MMU.h"
#include <luna/LinkedList.h> #include <luna/LinkedList.h>
#include <luna/Result.h> #include <luna/Result.h>
#include <luna/Stack.h> #include <luna/Stack.h>
@ -32,9 +33,14 @@ struct Thread : public LinkedListNode<Thread>
u64 sleep_ticks_left; u64 sleep_ticks_left;
Stack stack; Stack stack;
Stack kernel_stack;
ThreadState state = ThreadState::Runnable; ThreadState state = ThreadState::Runnable;
bool is_kernel { true };
PageDirectory* directory;
bool is_idle() bool is_idle()
{ {
return state == ThreadState::Idle; return state == ThreadState::Idle;