There is no need to pre save tp in cpu_fork().
Discussed with: jhb
This commit is contained in:
parent
6cb16b7e7a
commit
6d005bb212
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user