Store a bit more stuff in a thread :)
This commit is contained in:
parent
31ea030c7f
commit
ea89b92675
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user