diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index ac7daa4..6502e23 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1681,9 +1681,9 @@ thread_userret(struct thread *td, struct trapframe *frame) else upcalls += kg2->kg_numupcalls; } - mtx_unlock_spin(&sched_lock); if (upcalls >= max_threads_per_proc) break; + mtx_unlock_spin(&sched_lock); p->p_maxthrwaits++; msleep(&p->p_numthreads, &p->p_mtx, PPAUSE|PCATCH, "maxthreads", NULL); |