diff options
| author | David Xu <davidxu@FreeBSD.org> | 2002-10-26 02:56:51 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2002-10-26 02:56:51 +0000 |
| commit | 3139ada54cb93f1f52afa84f9c0609beffe53419 (patch) | |
| tree | 6492c9f839f3ded109f3c129f9bfa4997a515faa /sys/kern/kern_thread.c | |
| parent | 8dbf84eec4ae4d47ba9b79f6b0a092fbb35e13bc (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_thread.c')
| -rw-r--r-- | sys/kern/kern_thread.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2b4ad4a19e21..7721788c6324 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1241,6 +1241,18 @@ thread_userret(struct thread *td, struct trapframe *frame) p = td->td_proc; /* + * 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); + } + + /* * Originally bound threads never upcall but they may * loan out their KSE at this point. * Upcalls imply bound.. They also may want to do some Philantropy. |
