diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 2001-12-20 22:42:27 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 2001-12-20 22:42:27 +0000 |
| commit | 23b590188f01efac1fb8e70da3263498c9c07801 (patch) | |
| tree | 74464ed2703c6925992ebe509294859864e96118 /sys/kern/kern_lock.c | |
| parent | e45e83304a2401388f080b1ca34baef226da4909 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_lock.c')
| -rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index c7d4f2433e6e..929be460244c 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -166,7 +166,8 @@ acquire(struct lock *lkp, int extflags, int wanted) { lkp->lk_flags |= LK_WAIT_NONZERO; lkp->lk_waitcount++; error = msleep(lkp, lkp->lk_interlock, lkp->lk_prio, - lkp->lk_wmesg, lkp->lk_timo); + lkp->lk_wmesg, + ((extflags & LK_TIMELOCK) ? lkp->lk_timo : 0)); if (lkp->lk_waitcount == 1) { lkp->lk_flags &= ~LK_WAIT_NONZERO; lkp->lk_waitcount = 0; @@ -469,7 +470,8 @@ acquiredrain(struct lock *lkp, int extflags) { while (lkp->lk_flags & LK_ALL) { lkp->lk_flags |= LK_WAITDRAIN; error = msleep(&lkp->lk_flags, lkp->lk_interlock, lkp->lk_prio, - lkp->lk_wmesg, lkp->lk_timo); + lkp->lk_wmesg, + ((extflags & LK_TIMELOCK) ? lkp->lk_timo : 0)); if (error) return error; if (extflags & LK_SLEEPFAIL) { |
