From 53b54f664ed2b4630c23cacc9e216a6a5935b57f Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Tue, 14 May 2024 17:16:42 -0400 Subject: fixes to work on dept machine --- kernel/proc/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/proc/fork.c') 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 -- cgit v1.2.3-70-g09d2