diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2003-04-11 03:39:07 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2003-04-11 03:39:07 +0000 |
| commit | f6f230febea07bb9fda12ba1253659631acc9bbe (patch) | |
| tree | bcd37429fc86aa97a6c5365898aad0fe73ea4633 /sys/kern/kern_exit.c | |
| parent | 7842e8b37b30b72440eae326cb21b75b3c91541e (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index fee6caf62a9f..fc967e9af35a 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -494,6 +494,13 @@ exit1(struct thread *td, int rv) cpu_sched_exit(td); /* XXXKSE check if this should be in thread_exit */ /* + * Allow the scheduler to adjust the priority of the + * parent when a kseg is exiting. + */ + if (p->p_pid != 1) + sched_exit(p->p_pptr, p); + + /* * Make sure the scheduler takes this thread out of its tables etc. * This will also release this thread's reference to the ucred. * Other thread parts to release include pcb bits and such. @@ -575,17 +582,6 @@ loop: nfound++; if (p->p_state == PRS_ZOMBIE) { - /* - * Allow the scheduler to adjust the priority of the - * parent when a kseg is exiting. - */ - if (curthread->td_proc->p_pid != 1) { - mtx_lock_spin(&sched_lock); - sched_exit(curthread->td_ksegrp, - FIRST_KSEGRP_IN_PROC(p)); - mtx_unlock_spin(&sched_lock); - } - td->td_retval[0] = p->p_pid; #ifdef COMPAT_43 if (compat) |
