aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-13 21:27:39 -0400
committerIan Moffett <ian@osmora.org>2024-03-13 21:48:21 -0400
commitfc9c7bab5bb64dd2242e9e9dff98060d64af2a32 (patch)
tree7595e81043217c2e6ba81fe1cec5850bf7ae77b7 /sys/kern
parent8b68f956154b43b2b2fe2b8783ae6f23bf90d47b (diff)
kernel/amd64: machdep: Add pcb init code
This commit adds a processor specific routine which sets up the Process Control Block for a thread Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index 7be8241..f8f09c4 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -36,6 +36,7 @@
#include <sys/spinlock.h>
#include <sys/loader.h>
#include <sys/panic.h>
+#include <sys/machdep.h>
#include <fs/initramfs.h>
#include <vm/dynalloc.h>
#include <vm/physseg.h>
@@ -264,6 +265,7 @@ sched_create_td(uintptr_t rip, char *argvp[], char *envp[], struct auxval auxv,
td->cpu = NULL; /* Not yet assigned a core */
td->tf = tf;
td->addrsp = vas;
+ processor_init_pcb(td);
/* Setup trapframe */
if (!is_user) {