diff options
author | David Xu <davidxu@FreeBSD.org> | 2005-04-23 05:06:44 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2005-04-23 05:06:44 +0000 |
commit | bc247e78c092cb32fbe000e71d0c4d091ce6a59e (patch) | |
tree | 53e47fe165191bc0998b0bf79e2c05dc1244215c | |
parent | ff87e1a6ba0e1dd31ec9e34952677edde783088f (diff) |
Notes
-rw-r--r-- | sys/kern/kern_exit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index d7ff96943d5a..8fb5d495bc11 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -503,6 +503,15 @@ retry: 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(); |