PERFORCE change 110629 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Tue Nov 28 11:12:33 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=110629
Change 110629 by gonzo at gonzo_jeevse on 2006/11/28 19:11:53
o Set v0, v1 and a3 registers of new thread in cpu_fork
to proper results of fork syscall.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#10 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#10 (text+ko) ====
@@ -100,6 +100,16 @@
*/
td2->td_pcb->pcb_regs[PCB_REG_SP] = sp;
+ /*
+ * Return values for fork syscall for child:
+ * v0 == 0 -> actual return value
+ * v1 == 1 -> it's a child
+ * a3 == 0 -> no error
+ */
+ td2->td_frame->tf_regs[TF_V0] = 0;
+ td2->td_frame->tf_regs[TF_V1] = 1;
+ td2->td_frame->tf_regs[TF_A3] = 0;
+
/* Setup to release sched_lock in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_sr = td2->td_pcb->pcb_regs[PCB_REG_SR];
More information about the p4-projects
mailing list