Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Use wakeup_one() for waking up sleep lock sleepers.



details:   https://anonhg.NetBSD.org/src/rev/397bb86dbc5d
branches:  trunk
changeset: 474938:397bb86dbc5d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jul 26 23:02:53 1999 +0000

description:
Use wakeup_one() for waking up sleep lock sleepers.

diffstat:

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

diffs (45 lines):

diff -r b6e266cb24be -r 397bb86dbc5d sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Mon Jul 26 23:00:58 1999 +0000
+++ b/sys/kern/kern_lock.c      Mon Jul 26 23:02:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.19 1999/07/25 06:24:23 thorpej Exp $   */
+/*     $NetBSD: kern_lock.c,v 1.20 1999/07/26 23:02:53 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -305,7 +305,7 @@
                lkp->lk_flags &= ~LK_HAVE_EXCL;
                SETHOLDER(lkp, LK_NOPROC, LK_NOCPU);
                if (lkp->lk_waitcount)
-                       wakeup((void *)lkp);
+                       wakeup_one((void *)lkp);
                break;
 
        case LK_EXCLUPGRADE:
@@ -371,7 +371,7 @@
                 * lock, then request an exclusive lock.
                 */
                if (lkp->lk_sharecount == 0 && lkp->lk_waitcount)
-                       wakeup((void *)lkp);
+                       wakeup_one((void *)lkp);
                /* fall into exclusive request */
 
        case LK_EXCLUSIVE:
@@ -456,7 +456,7 @@
                        COUNT(p, -1);
                }
                if (lkp->lk_waitcount)
-                       wakeup((void *)lkp);
+                       wakeup_one((void *)lkp);
                break;
 
        case LK_DRAIN:
@@ -522,7 +522,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((void *)&lkp->lk_flags);
+               wakeup_one((void *)&lkp->lk_flags);
        }
        simple_unlock(&lkp->lk_interlock);
        return (error);



Home | Main Index | Thread Index | Old Index