diff --git a/sys/arch/usermode/dev/cpu.c b/sys/arch/usermode/dev/cpu.c index 2cb11c132624..0c3dfd1ac3b2 100644 --- a/sys/arch/usermode/dev/cpu.c +++ b/sys/arch/usermode/dev/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.42 2011/09/09 18:41:16 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.43 2011/09/09 20:06:04 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -30,7 +30,7 @@ #include "opt_hz.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.42 2011/09/09 18:41:16 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.43 2011/09/09 20:06:04 reinoud Exp $"); #include #include @@ -315,20 +315,20 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, if (thunk_getcontext(&pcb2->pcb_ucp)) panic("getcontext failed"); - /* set up the ucontext for the userland */ + /* set up the ucontext for the userland switch */ pcb2->pcb_ucp.uc_stack.ss_sp = stack; pcb2->pcb_ucp.uc_stack.ss_size = stacksize; pcb2->pcb_ucp.uc_link = &pcb2->pcb_userland_ucp; pcb2->pcb_ucp.uc_flags = _UC_STACK | _UC_CPU; - thunk_makecontext(&pcb2->pcb_ucp, (void (*)(void))cpu_lwp_trampoline, - 2, func, arg); + thunk_makecontext(&pcb2->pcb_ucp, (void (*)(void)) cpu_lwp_trampoline, + 2, func, arg, NULL); /* set up the ucontext for the syscall */ pcb2->pcb_syscall_ucp.uc_flags = _UC_CPU; pcb2->pcb_syscall_ucp.uc_link = &pcb2->pcb_userland_ucp; pcb2->pcb_syscall_ucp.uc_stack.ss_size = 0; /* no stack move */ thunk_makecontext(&pcb2->pcb_syscall_ucp, (void (*)(void)) syscall, - 0, NULL, NULL); + 0, NULL, NULL, NULL); } void diff --git a/sys/arch/usermode/usermode/machdep.c b/sys/arch/usermode/usermode/machdep.c index 481d4f39a4f5..189b2a7d2bce 100644 --- a/sys/arch/usermode/usermode/machdep.c +++ b/sys/arch/usermode/usermode/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.28 2011/09/09 12:44:27 reinoud Exp $ */ +/* $NetBSD: machdep.c,v 1.29 2011/09/09 20:06:04 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk @@ -32,7 +32,7 @@ #include "opt_urkelvisor.h" #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2011/09/09 12:44:27 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2011/09/09 20:06:04 reinoud Exp $"); #include #include @@ -200,7 +200,7 @@ setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack) ucp->uc_stack.ss_sp = (void *) (stack-4); /* to prevent clearing */ ucp->uc_stack.ss_size = 0; //pack->ep_ssize; - thunk_makecontext(ucp, (void *) pack->ep_entry, 0, NULL, NULL); + thunk_makecontext(ucp, (void *) pack->ep_entry, 0, NULL, NULL, NULL); /* patch up */ reg[ 8] = l->l_proc->p_psstrp; /* _REG_EBX */