Date: Tue, 28 Nov 2006 19:12:27 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 110629 for review Message-ID: <200611281912.kASJCRGK059753@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110629 Change 110629 by gonzo@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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611281912.kASJCRGK059753>