summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-07-02 01:19:15 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-07-02 01:19:15 +0000
commit4d993c5846626cb8dea4226630a6749dea539c33 (patch)
tree9c483ef522c95ae592986622a8ade858212303f0 /sys/kern
parent7616d9bb52a5ba8451e78ffba22269aeb1acc13d (diff)
downloadFreeBSD-src-4d993c5846626cb8dea4226630a6749dea539c33.zip
FreeBSD-src-4d993c5846626cb8dea4226630a6749dea539c33.tar.gz
Allow SA process unblocks a thread blocked in condition variable.
Reviewed by: deischen
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_condvar.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index f43018c..3344123 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -287,8 +287,11 @@ cv_wait_sig(struct cv *cvp, struct mtx *mp)
PROC_LOCK(p);
mtx_lock(&p->p_sigacts->ps_mtx);
- if (sig == 0)
+ if (sig == 0) {
sig = cursig(td); /* XXXKSE */
+ if (sig == 0 && td->td_flags & TDF_INTERRUPT)
+ rval = td->td_intrval;
+ }
if (sig != 0) {
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
@@ -452,8 +455,11 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
PROC_LOCK(p);
mtx_lock(&p->p_sigacts->ps_mtx);
- if (sig == 0)
+ if (sig == 0) {
sig = cursig(td);
+ if (sig == 0 && td->td_flags & TDF_INTERRUPT)
+ rval = td->td_intrval;
+ }
if (sig != 0) {
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
OpenPOWER on IntegriCloud