summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorAptRock327 <dominik032009@gmail.com>2024-07-22 22:50:29 +0200
committerIan Moffett <ian@osmora.org>2024-07-22 17:49:07 -0400
commit322d41a2b01d70462fd2fa6a96d70b06a423e78b (patch)
tree57f9fd07f4c405b2ce97a06de6b37b1600a3916d /sys/include
parent599ef07b89aa31c089398922ef65804f47f44b55 (diff)
kernel: sched: Implement MLFQ
Implements the Multilevel Feedback Queue scheduling algorithm. Signed-off-by: AptRock327 <dominik032009@gmail.com> Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/proc.h1
-rw-r--r--sys/include/sys/sched.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h
index ed75f71..b9db603 100644
--- a/sys/include/sys/proc.h
+++ b/sys/include/sys/proc.h
@@ -56,6 +56,7 @@ struct proc {
struct trapframe tf;
struct pcb pcb;
size_t priority;
+ bool rested;
uint32_t flags;
uintptr_t stack_base;
TAILQ_ENTRY(proc) link;
diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h
index 52ca1ba..829e57d 100644
--- a/sys/include/sys/sched.h
+++ b/sys/include/sys/sched.h
@@ -36,6 +36,7 @@
#if defined(_KERNEL)
void sched_init(void);
+void sched_yield(void);
__dead void sched_enter(void);
void sched_enqueue_td(struct proc *td);