Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode Use the new thunk_makecontext() scheme wit...



details:   https://anonhg.NetBSD.org/src/rev/12e8e3f1ae28
branches:  trunk
changeset: 769434:12e8e3f1ae28
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Sep 09 20:06:04 2011 +0000

description:
Use the new thunk_makecontext() scheme with function and upto 3 aguments

diffstat:

 sys/arch/usermode/dev/cpu.c          |  12 ++++++------
 sys/arch/usermode/usermode/machdep.c |   6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (70 lines):

diff -r bb41a5d32c01 -r 12e8e3f1ae28 sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Fri Sep 09 20:04:43 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Fri Sep 09 20:06:04 2011 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/conf.h>
@@ -315,20 +315,20 @@
        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 -r bb41a5d32c01 -r 12e8e3f1ae28 sys/arch/usermode/usermode/machdep.c
--- a/sys/arch/usermode/usermode/machdep.c      Fri Sep 09 20:04:43 2011 +0000
+++ b/sys/arch/usermode/usermode/machdep.c      Fri Sep 09 20:06:04 2011 +0000
@@ -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 <reinoud%netbsd.org@localhost>
@@ -32,7 +32,7 @@
 #include "opt_urkelvisor.h"
 
 #include <sys/cdefs.h>
-__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 <sys/types.h>
 #include <sys/param.h>
@@ -200,7 +200,7 @@
 
        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 */



Home | Main Index | Thread Index | Old Index