diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-08-21 18:42:45 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-08-21 18:42:45 +0000 |
| commit | 91a4536f22428372cb98cd4db373f9396b803de1 (patch) | |
| tree | 816f3f94107ba741a2226b2601f4d608094894b4 /sys/kern/kern_synch.c | |
| parent | eb5b46344979661f4c24eb5315980c8fcadb669a (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_synch.c')
| -rw-r--r-- | sys/kern/kern_synch.c | 7 |
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); } |
