There is no need to pre save tp in cpu_fork().

Discussed with: jhb
This commit is contained in:
Ruslan Bukin 2016-02-17 14:13:25 +00:00
parent 6cb16b7e7a
commit 6d005bb212

View File

@ -64,16 +64,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
{
struct pcb *pcb2;
struct trapframe *tf;
uint64_t val;
if ((flags & RFPROC) == 0)
return;
if (td1 == curthread) {
__asm __volatile("mv %0, tp" : "=&r"(val));
td1->td_pcb->pcb_tp = val;
}
pcb2 = (struct pcb *)(td2->td_kstack +
td2->td_kstack_pages * PAGE_SIZE) - 1;