Wake up swapper process if needed.
PR: kern/78474 Submitted by: Sam Lawrance <boris at brooknet dot com dot au>
This commit is contained in:
parent
ff87e1a6ba
commit
bc247e78c0
@ -503,6 +503,15 @@ exit1(struct thread *td, int rv)
|
||||
critical_enter();
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
wakeup(p->p_pptr);
|
||||
/*
|
||||
* XXX hack, swap in parent process, please see TDP_WAKEPROC0
|
||||
* code, because TDP_WAKEPROC0 is only useful if thread is
|
||||
* leaving critical region, but here we never leave and
|
||||
* thread_exit() will call cpu_throw(), TDP_WAKEPROC0 is never
|
||||
* cleared.
|
||||
*/
|
||||
if (p->p_pptr->p_sflag & PS_SWAPINREQ)
|
||||
wakeup(&proc0);
|
||||
PROC_UNLOCK(p->p_pptr);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
critical_exit();
|
||||
|
Loading…
Reference in New Issue
Block a user