summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-19 17:47:01 -0500
committerIan Moffett <ian@osmora.org>2025-11-19 17:47:01 -0500
commitb09819f09d88f8860042a54a54eec188b8631142 (patch)
tree7fdfd5536576d8b1a131631ca0af258cc1d8356e /sys
parent295ee614d60e904e4aa0c164090bdef6f9e94aa7 (diff)
kern: mu: Add percpu queue for scheduling
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/cpu/cpu.c1
-rw-r--r--sys/inc/mu/cpu.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/arch/amd64/cpu/cpu.c b/sys/arch/amd64/cpu/cpu.c
index be2bf7d..4edc850 100644
--- a/sys/arch/amd64/cpu/cpu.c
+++ b/sys/arch/amd64/cpu/cpu.c
@@ -51,4 +51,5 @@ cpu_conf(struct cpu_info *ci)
{
wrmsr(IA32_GS_BASE, (uintptr_t)ci);
lapic_init();
+ TAILQ_INIT(&ci->pqueue);
}
diff --git a/sys/inc/mu/cpu.h b/sys/inc/mu/cpu.h
index d123f43..288ba9e 100644
--- a/sys/inc/mu/cpu.h
+++ b/sys/inc/mu/cpu.h
@@ -30,7 +30,9 @@
#ifndef _MU_CPU_H_
#define _MU_CPU_H_ 1
+#include <sys/queue.h>
#include <sys/types.h>
+#include <os/process.h>
#include <md/mcb.h>
/*
@@ -38,10 +40,14 @@
*
* @id: Logical ID of the processor
* @mcb: Machine core block
+ * @curproc: Current process
+ * @pqueue: Process queue
*/
struct cpu_info {
uint8_t id;
struct mcb mcb;
+ struct process *curproc;
+ TAILQ_HEAD(, process) pqueue;
};
/*