summaryrefslogtreecommitdiff
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-08-21 18:42:45 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-08-21 18:42:45 +0000
commit91a4536f22428372cb98cd4db373f9396b803de1 (patch)
tree816f3f94107ba741a2226b2601f4d608094894b4 /sys/kern/kern_synch.c
parenteb5b46344979661f4c24eb5315980c8fcadb669a (diff)
Notes
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 813bec10b8c2..6a20e1038f8c 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -451,7 +451,9 @@ msleep(ident, mtx, priority, wmesg, timo)
p->p_sflag &= ~PS_TIMEOUT;
if (sig == 0)
rval = EWOULDBLOCK;
- } else if (timo && callout_stop(&p->p_slpcallout) == 0) {
+ } else if (p->p_sflag & PS_TIMOFAIL)
+ p->p_sflag &= ~PS_TIMOFAIL;
+ else if (timo && callout_stop(&p->p_slpcallout) == 0) {
/*
* This isn't supposed to be pretty. If we are here, then
* the endtsleep() callout is currently executing on another
@@ -524,7 +526,8 @@ endtsleep(arg)
else
unsleep(p);
p->p_sflag |= PS_TIMEOUT;
- }
+ } else
+ p->p_sflag |= PS_TIMOFAIL;
mtx_unlock_spin(&sched_lock);
}