diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 6bcd1b2..d4e74f0 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -357,8 +357,17 @@ kse_release(struct thread *td, struct kse_release_args *uap) /* NOTREACHED */ } else { mtx_unlock_spin(&sched_lock); - PROC_UNLOCK(p); - return EWOULDBLOCK; + if (td->td_standin == NULL) { + PROC_UNLOCK(p); + td->td_standin = thread_alloc(); + PROC_LOCK(p); + } + msleep(p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, + "pause", 0); + mtx_lock_spin(&sched_lock); + td->td_flags &= ~TDF_UNBOUND; + thread_schedule_upcall(td, td->td_kse); + thread_exit(); } } return (EINVAL); |