--- src/sys/platform/pc32/i386/pmap.c 2007/02/03 17:05:58 1.73 +++ src/sys/platform/pc32/i386/pmap.c 2007/02/24 14:24:06 1.74 @@ -915,22 +915,14 @@ pmap_init_proc(struct proc *p, struct th * Dispose the UPAGES for a process that has exited. * This routine directly impacts the exit perf of a process. */ -struct thread * +void pmap_dispose_proc(struct proc *p) { - struct thread *td = NULL; - struct lwp *lp; - KASSERT(p->p_lock == 0, ("attempt to dispose referenced proc! %p", p)); - lp = ONLY_LWP_IN_PROC(p); - if (lp != NULL && (td = lp->lwp_thread) != NULL) { - td->td_proc = NULL; - td->td_lwp = NULL; - lp->lwp_thread = NULL; - } + lwp_dispose(ONLY_LWP_IN_PROC(p)); + p->p_addr = NULL; - return(td); } /***************************************************