PERFORCE change 48837 for review
Juli Mallett
jmallett at FreeBSD.org
Fri Mar 12 16:26:08 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=48837
Change 48837 by jmallett at 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
More information about the p4-projects
mailing list