diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 9c492dd1f881..feee12b033aa 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -1427,16 +1427,6 @@ thread_userret(struct thread *td, struct trapframe *frame) return (error); /* go sync */ } -int -thread_upcall_check(struct thread *td) -{ - PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); - if (td->td_kflags & TDK_WAKEUP) - return (1); - else - return (0); -} - /* * called after ptrace resumed a process, force all * virtual CPUs to schedule upcall for SA process, diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 6d1f1c2d06a2..44a2596d29e6 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -345,10 +345,8 @@ sleepq_catch_signals(void *wchan) struct sleepqueue *sq; struct thread *td; struct proc *p; - int do_upcall; int sig; - do_upcall = 0; td = curthread; p = td->td_proc; sc = SC_LOOKUP(wchan); @@ -370,8 +368,6 @@ sleepq_catch_signals(void *wchan) mtx_unlock(&p->p_sigacts->ps_mtx); if (sig == 0 && thread_suspend_check(1)) sig = SIGSTOP; - else - do_upcall = thread_upcall_check(td); PROC_UNLOCK(p); /* @@ -383,7 +379,7 @@ sleepq_catch_signals(void *wchan) sleepq_lock(wchan); sq = sleepq_lookup(wchan); mtx_lock_spin(&sched_lock); - if (TD_ON_SLEEPQ(td) && (sig != 0 || do_upcall != 0)) + if (TD_ON_SLEEPQ(td) && sig != 0) sleepq_resume_thread(sq, td, -1); else if (!TD_ON_SLEEPQ(td) && sig == 0) td->td_flags &= ~TDF_SINTR; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index fdf77e5ffeba..2eed9e2de2a3 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -928,7 +928,6 @@ struct thread *thread_switchout(struct thread *td, int flags, void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); void thread_unsuspend_one(struct thread *td); -int thread_upcall_check(struct thread *td); void thread_unthread(struct thread *td); int thread_userret(struct thread *td, struct trapframe *frame); void thread_user_enter(struct thread *td);