diff options
author | julian <julian@FreeBSD.org> | 2002-09-07 01:48:53 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-09-07 01:48:53 +0000 |
commit | d191c82c92a3d2e93896cad3640f2cb611958d2b (patch) | |
tree | 3e17763bad209787e5313d7512d7b0a026150b35 | |
parent | ec9cab8da4e70ca1743d080f88605c0a3caabb54 (diff) | |
download | FreeBSD-src-d191c82c92a3d2e93896cad3640f2cb611958d2b.zip FreeBSD-src-d191c82c92a3d2e93896cad3640f2cb611958d2b.tar.gz |
fix misplaced schedlock
Submitted by: davidxu@freebsd.org
-rw-r--r-- | sys/kern/kern_kse.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 8b2b88c..87b0f12 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -742,9 +742,9 @@ thread_suspend_check(int return_instead) psignal(p->p_pptr, SIGCHLD); } PROC_UNLOCK(p->p_pptr); + mtx_lock_spin(&sched_lock); } mtx_assert(&Giant, MA_NOTOWNED); - mtx_lock_spin(&sched_lock); p->p_suspcount++; td->td_state = TDS_SUSPENDED; TAILQ_INSERT_TAIL(&p->p_suspended, td, td_runq); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 8b2b88c..87b0f12 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -742,9 +742,9 @@ thread_suspend_check(int return_instead) psignal(p->p_pptr, SIGCHLD); } PROC_UNLOCK(p->p_pptr); + mtx_lock_spin(&sched_lock); } mtx_assert(&Giant, MA_NOTOWNED); - mtx_lock_spin(&sched_lock); p->p_suspcount++; td->td_state = TDS_SUSPENDED; TAILQ_INSERT_TAIL(&p->p_suspended, td, td_runq); |