diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2002-10-26 04:44:17 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2002-10-26 04:44:17 +0000 |
| commit | 053effc60e3399aed3ddcd1a61c57c3eb9ccc9ae (patch) | |
| tree | d2c2261decd2b0cb6aaeebb97f2935d4658e729e /sys/kern/subr_trap.c | |
| parent | 1ba72e3513170d25d664280669eb7b8eaace769e (diff) | |
Notes
Diffstat (limited to 'sys/kern/subr_trap.c')
| -rw-r--r-- | sys/kern/subr_trap.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 2337423ec559..9f8bed0aa85a 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -100,8 +100,19 @@ userret(td, frame, oticks) sched_userret(td); /* - * Do special thread processing, e.g. suspension checking, upcall - * tweaking and such. + * We need to check to see if we have to exit or wait due to a + * single threading requirement or some other STOP condition. + * Don't bother doing all the work if the stop bits are not set + * at this time.. If we miss it, we miss it.. no big deal. + */ + if (P_SHOULDSTOP(p)) { + PROC_LOCK(p); + thread_suspend_check(0); /* Can suspend or kill */ + PROC_UNLOCK(p); + } + + /* + * Do special thread processing, e.g. upcall tweaking and such. */ if (p->p_flag & P_KSES) { thread_userret(td, frame); |
