summaryrefslogtreecommitdiff
path: root/sys/kern/subr_sleepqueue.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2008-10-24 01:03:31 +0000
committerDavid Xu <davidxu@FreeBSD.org>2008-10-24 01:03:31 +0000
commit6406fd0be66faaad408805c6f8a74d08e884fdd1 (patch)
tree155e2292d15151c02e028236ab56960d1587f709 /sys/kern/subr_sleepqueue.c
parent6239752624a680b75062ab82baaca5c645ea60a4 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r--sys/kern/subr_sleepqueue.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 751fa64a741d..0f00a70ba09b 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -396,7 +396,6 @@ sleepq_catch_signals(void *wchan, int pri)
return (0);
}
-catch_sig:
thread_unlock(td);
mtx_unlock_spin(&sc->sc_lock);
CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)",
@@ -416,19 +415,15 @@ catch_sig:
ret = ERESTART;
mtx_unlock(&ps->ps_mtx);
}
- PROC_UNLOCK(p);
mtx_lock_spin(&sc->sc_lock);
thread_lock(td);
- if (ret != 0)
- goto out;
- if ((td->td_flags & (TDF_NEEDSIGCHK | TDF_NEEDSUSPCHK)) != 0)
- goto catch_sig;
-
- sleepq_switch(wchan, pri);
- return (0);
+ PROC_UNLOCK(p);
+ if (ret == 0) {
+ sleepq_switch(wchan, pri);
+ return (0);
+ }
-out:
/*
* There were pending signals and this thread is still
* on the sleep queue, remove it from the sleep queue.