summaryrefslogtreecommitdiff
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-04-18 20:20:00 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-04-18 20:20:00 +0000
commit889a6b5845d3937ad0cce31217fdbc054720f45d (patch)
tree4e218d8ce7a895c200dd2841ed79f026a6d9bb7e /sys/kern/kern_thread.c
parente77daab1af5493ec44dbb643e679be4b4466e9f5 (diff)
Notes
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 5f03369138bc..cb9157771256 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -1544,15 +1544,15 @@ thread_user_enter(struct proc *p, struct thread *td)
/*
* First check that we shouldn't just abort.
* But check if we are the single thread first!
- * XXX p_singlethread not locked, but should be safe.
*/
+ PROC_LOCK(p);
if ((p->p_flag & P_SINGLE_EXIT) && (p->p_singlethread != td)) {
- PROC_LOCK(p);
mtx_lock_spin(&sched_lock);
thread_stopped(p);
thread_exit();
/* NOTREACHED */
}
+ PROC_UNLOCK(p);
/*
* If we are doing a syscall in a KSE environment,