aboutsummaryrefslogtreecommitdiff
path: root/kernel/proc/fork.c
diff options
context:
space:
mode:
authorMichael Foiani <mfoiani@cs.brown.edu>2024-05-14 17:16:42 -0400
committerMichael Foiani <mfoiani@cs.brown.edu>2024-05-14 17:16:42 -0400
commit53b54f664ed2b4630c23cacc9e216a6a5935b57f (patch)
treef0138f1ed2f8894efa560e0e9721e510883f439b /kernel/proc/fork.c
parentb90313ddfa4c03f688c6c1cd5ded34aff1bf39c5 (diff)
fixes to work on dept machine
Diffstat (limited to 'kernel/proc/fork.c')
-rw-r--r--kernel/proc/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/proc/fork.c b/kernel/proc/fork.c
index b501b1e..a6436ba 100644
--- a/kernel/proc/fork.c
+++ b/kernel/proc/fork.c
@@ -75,7 +75,7 @@ long do_fork(struct regs *regs)
// Fix the values of the registers and the rest of the kthread's ctx
regs->r_rax = 0; // Set the return value to 0 for the child
- child_thread->kt_ctx.c_rsp = fork_setup_stack(regs, child_thread->kt_ctx.c_kstack); // Set the stack pointer for the child
+ child_thread->kt_ctx.c_rsp = fork_setup_stack(regs, (void *)child_thread->kt_ctx.c_kstack); // Set the stack pointer for the child
child_thread->kt_ctx.c_rip = (uintptr_t) userland_entry; // Set the instruction pointer to userland_entry
// child_thread->kt_ctx.c_rbp = curthr->kt_ctx.c_rbp; // Set the current thread's base pointer to the child's base pointer
child_thread->kt_ctx.c_pml4 = child_proc->p_pml4; // Set the current thread's page table to the child's page table