Date: Fri, 12 Mar 2004 16:26:07 -0800 (PST) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 48837 for review Message-ID: <200403130026.i2D0Q7Vq034415@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48837 Change 48837 by jmallett@jmallett_oingo on 2004/03/12 16:25:37 Set up frame, set up the upcall stuff, GC some printfs. Affected files ... .. //depot/projects/mips/sys/mips/mips/vm_machdep.c#10 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/vm_machdep.c#10 (text+ko) ==== @@ -70,7 +70,6 @@ cpu_thread_setup(td2); /* Copy the pcb */ - printf("cpu_fork: copy from %p to %p\n", td->td_pcb, td2->td_pcb); bcopy(td->td_pcb, td2->td_pcb, sizeof(struct pcb)); /* @@ -79,7 +78,6 @@ * syscall. This copies most of the user mode register values. */ tf = (struct trapframe *)td2->td_pcb - 1; - printf("cpu_fork: copy from fr %p to tf %p\n", td->td_frame, tf); bcopy(td->td_frame, tf, sizeof(*tf)); /* Set up trap frame. */ @@ -121,12 +119,14 @@ { td->td_pcb = (struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + td->td_frame = (struct trapframe *)td->td_pcb - 1; } void cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) { - panic("%s", __func__); + td->td_pcb->pcb_regs[10] = (register_t)func; + td->td_pcb->pcb_regs[0] = (register_t)arg; } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403130026.i2D0Q7Vq034415>