diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-01-26 23:39:33 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-01-26 23:39:33 +0000 |
commit | d7d17fc4e6a7a79da7c8620ac888125cc5628476 (patch) | |
tree | a60cae2413b063f02c103d601b974ca16d6b23d9 | |
parent | 0e17357e12590ffa92f25fab4cc66dfeb833d4f5 (diff) | |
download | FreeBSD-src-d7d17fc4e6a7a79da7c8620ac888125cc5628476.zip FreeBSD-src-d7d17fc4e6a7a79da7c8620ac888125cc5628476.tar.gz |
Use kg_numupcalls to see if we are closing a thread group,
not kg_kses which is not changed when a group is still working.
-rw-r--r-- | sys/kern/kern_kse.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 883f4d1..db82019 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -429,10 +429,10 @@ kse_exit(struct thread *td, struct kse_exit_args *uap) KASSERT((td->td_upcall != NULL), ("%s: not own an upcall", __func__)); kg = td->td_ksegrp; - /* Serialize killing KSE */ + /* Serialize removing upcall */ PROC_LOCK(p); mtx_lock_spin(&sched_lock); - if ((kg->kg_kses == 1) && (kg->kg_numthreads > 1)) { + if ((kg->kg_numupcalls == 1) && (kg->kg_numthreads > 1)) { mtx_unlock_spin(&sched_lock); PROC_UNLOCK(p); return (EDEADLK); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 883f4d1..db82019 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -429,10 +429,10 @@ kse_exit(struct thread *td, struct kse_exit_args *uap) KASSERT((td->td_upcall != NULL), ("%s: not own an upcall", __func__)); kg = td->td_ksegrp; - /* Serialize killing KSE */ + /* Serialize removing upcall */ PROC_LOCK(p); mtx_lock_spin(&sched_lock); - if ((kg->kg_kses == 1) && (kg->kg_numthreads > 1)) { + if ((kg->kg_numupcalls == 1) && (kg->kg_numthreads > 1)) { mtx_unlock_spin(&sched_lock); PROC_UNLOCK(p); return (EDEADLK); |