diff options
Diffstat (limited to 'kernel/proc/fork.c')
-rw-r--r-- | kernel/proc/fork.c | 2 |
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 |