summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-01-26 23:39:33 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-01-26 23:39:33 +0000
commitd7d17fc4e6a7a79da7c8620ac888125cc5628476 (patch)
treea60cae2413b063f02c103d601b974ca16d6b23d9 /sys/kern/kern_thread.c
parent0e17357e12590ffa92f25fab4cc66dfeb833d4f5 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c4
1 files changed, 2 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud