diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2007-09-21 04:04:22 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2007-09-21 04:04:22 +0000 |
| commit | f462501739de3fa584bdf5fd25f970ee7dbef058 (patch) | |
| tree | 6d98cd30b5e7e7ba84da4323e5bae804102b875b | |
| parent | d332abbac7ec91cb92c7babd6f65bcf134aacdb4 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index b0032572290e..97c56a4f4595 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -852,6 +852,7 @@ thread_suspend_switch(struct thread *td) p->p_suspcount++; PROC_UNLOCK(p); thread_lock(td); + sched_sleep(td); TD_SET_SUSPENDED(td); PROC_SUNLOCK(p); DROP_GIANT(); @@ -871,6 +872,7 @@ thread_suspend_one(struct thread *td) THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(!TD_IS_SUSPENDED(td), ("already suspended")); p->p_suspcount++; + sched_sleep(td); TD_SET_SUSPENDED(td); } |
