/* * cpu_exit is called as the last action during exit. * * We clean up a little and then call sched_exit() with the old proc as an * argument. */ void cpu_exit(struct proc *p) { /* If we were using the FPU, forget about it. */ if (p->p_addr->u_pcb.pcb_fpcpu != NULL) fpusave_proc(p, 0); if (p->p_md.md_flags & MDP_USEDMTRR) mtrr_clean(p); pmap_deactivate(p); tss_free(p->p_md.md_tss_sel); sched_exit(p); }
void cpu_wait(struct proc *p) { tss_free(p->p_md.md_tss_sel); }
/* * cpu_wait is called from reaper() to let machine-dependent * code free machine-dependent resources that couldn't be freed * in cpu_exit(). */ void cpu_wait(struct proc *p) { /* Nuke the TSS. */ tss_free(p->p_md.md_tss_sel); }