diff options
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/vm_machdep.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index f952ecc..177f634 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -194,7 +194,7 @@ cpu_fork(register struct thread *td1,register struct proc *p2, * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func) __P((void *)), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { /* * Note that the trap frame follows the args, so the function @@ -352,14 +352,14 @@ cpu_set_syscall_retval(struct thread *td, int error) } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcalls that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct pcb *pcb2; @@ -415,12 +415,11 @@ cpu_set_upcall(struct thread *td, struct thread *td0) } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; |