It is not necessary to read %gs twice.

This commit is contained in:
davidxu 2006-03-10 05:55:26 +00:00
parent b36ad9d674
commit 651e183fe9

View File

@ -172,9 +172,9 @@ cpu_fork(td1, p2, td2, flags)
} }
/* Ensure that p1's pcb is up to date. */ /* Ensure that p1's pcb is up to date. */
#ifdef DEV_NPX
if (td1 == curthread) if (td1 == curthread)
td1->td_pcb->pcb_gs = rgs(); td1->td_pcb->pcb_gs = rgs();
#ifdef DEV_NPX
savecrit = intr_disable(); savecrit = intr_disable();
if (PCPU_GET(fpcurthread) == td1) if (PCPU_GET(fpcurthread) == td1)
npxsave(&td1->td_pcb->pcb_save); npxsave(&td1->td_pcb->pcb_save);
@ -233,7 +233,6 @@ cpu_fork(td1, p2, td2, flags)
pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */ pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
pcb2->pcb_eip = (int)fork_trampoline; pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl = PSL_KERNEL; /* ints disabled */ pcb2->pcb_psl = PSL_KERNEL; /* ints disabled */
pcb2->pcb_gs = rgs();
/*- /*-
* pcb2->pcb_dr*: cloned above. * pcb2->pcb_dr*: cloned above.
* pcb2->pcb_savefpu: cloned above. * pcb2->pcb_savefpu: cloned above.