Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern replace wakeup_one() with wakeup(). wakeup_one() c...



details:   https://anonhg.NetBSD.org/src/rev/9741ec39d273
branches:  trunk
changeset: 515617:9741ec39d273
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Sep 29 21:27:49 2001 +0000

description:
replace wakeup_one() with wakeup().  wakeup_one() can only be used if the
woken-up thread is guaranteed to pass the buck to the next guy before
going back to sleep, and the rest of the lockmgr() code doesn't do that.
from Bill Sommerfeld.  fixes PR 14097.

diffstat:

 sys/kern/kern_lock.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e7db309dad6a -r 9741ec39d273 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Sat Sep 29 21:22:49 2001 +0000
+++ b/sys/kern/kern_lock.c      Sat Sep 29 21:27:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.58 2001/09/25 06:13:29 chs Exp $       */
+/*     $NetBSD: kern_lock.c,v 1.59 2001/09/29 21:27:49 chs Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -257,7 +257,7 @@
 do {                                                                   \
        if (((lkp)->lk_flags & LK_SPIN) == 0 && (lkp)->lk_waitcount) {  \
                /* XXX Cast away volatile. */                           \
-               wakeup_one((void *)(lkp));                              \
+               wakeup((void *)(lkp));                                  \
        }                                                               \
 } while (/*CONSTCOND*/0)
 
@@ -791,7 +791,7 @@
              (LK_HAVE_EXCL | LK_WANT_EXCL | LK_WANT_UPGRADE)) == 0 &&
             lkp->lk_sharecount == 0 && lkp->lk_waitcount == 0)) {
                lkp->lk_flags &= ~LK_WAITDRAIN;
-               wakeup_one((void *)&lkp->lk_flags);
+               wakeup((void *)&lkp->lk_flags);
        }
        /*
         * Note that this panic will be a recursive panic, since



Home | Main Index | Thread Index | Old Index