diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-10-16 04:17:17 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-10-16 04:17:17 +0000 |
commit | 3f5ab59cf2498b8adba948fdf75cd0ce1f968698 (patch) | |
tree | f07d2edf5ff0208af1e2a90182626dfd32232a5c /sys/kern/kern_thread.c | |
parent | 994d46ed0c750c32a08dbe3198bc7cc80417defb (diff) | |
download | FreeBSD-src-3f5ab59cf2498b8adba948fdf75cd0ce1f968698.zip FreeBSD-src-3f5ab59cf2498b8adba948fdf75cd0ce1f968698.tar.gz |
Restore code wrongly removed in SVN revision 173004, it causes threaded
process to be stuck in execv().
Noticed by: delphij
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 7298edc..3bde08e 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -572,8 +572,16 @@ thread_single(int mode) sleepq_abort(td2, EINTR); break; case SINGLE_BOUNDARY: + if (TD_IS_SUSPENDED(td2) && + !(td2->td_flags & TDF_BOUNDARY)) + wakeup_swapper |= + thread_unsuspend_one(td2); + if (TD_ON_SLEEPQ(td2) && + (td2->td_flags & TDF_SINTR)) + wakeup_swapper |= + sleepq_abort(td2, ERESTART); break; - default: + default: if (TD_IS_SUSPENDED(td2)) { thread_unlock(td2); continue; |