Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/vm_machdep.c
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) | ||||
} | } | ||||
/* Point the stack and pcb to the actual location */ | /* Point the stack and pcb to the actual location */ | ||||
set_top_of_stack_td(td2); | set_top_of_stack_td(td2); | ||||
td2->td_pcb = pcb2 = get_pcb_td(td2); | td2->td_pcb = pcb2 = get_pcb_td(td2); | ||||
copy_thread(td1, td2); | copy_thread(td1, td2); | ||||
/* Reset debug registers in the new process */ | |||||
pcb2->pcb_dr0 = 0; | |||||
pcb2->pcb_dr1 = 0; | |||||
pcb2->pcb_dr2 = 0; | |||||
pcb2->pcb_dr3 = 0; | |||||
pcb2->pcb_dr6 = 0; | |||||
pcb2->pcb_dr7 = 0; | |||||
/* Point mdproc and then copy over p1's contents */ | /* Point mdproc and then copy over p1's contents */ | ||||
mdp2 = &p2->p_md; | mdp2 = &p2->p_md; | ||||
bcopy(&p1->p_md, mdp2, sizeof(*mdp2)); | bcopy(&p1->p_md, mdp2, sizeof(*mdp2)); | ||||
/* | /* | ||||
* Copy the trap frame for the return to user mode as if from a | * Copy the trap frame for the return to user mode as if from a | ||||
* syscall. This copies most of the user mode register values. | * syscall. This copies most of the user mode register values. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 485 Lines • Show Last 20 Lines |