Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Use ltsleep().



details:   https://anonhg.NetBSD.org/src/rev/89f9f75f0ab0
branches:  trunk
changeset: 487463:89f9f75f0ab0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jun 08 05:50:59 2000 +0000

description:
Use ltsleep().

diffstat:

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

diffs (25 lines):

diff -r b23ca15068fd -r 89f9f75f0ab0 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Thu Jun 08 05:50:37 2000 +0000
+++ b/sys/kern/kern_lock.c      Thu Jun 08 05:50:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.30 2000/05/23 05:17:11 thorpej Exp $   */
+/*     $NetBSD: kern_lock.c,v 1.31 2000/06/08 05:50:59 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -168,12 +168,11 @@
                                (lkp)->lk_flags |= LK_WAITDRAIN;        \
                        else                                            \
                                (lkp)->lk_waitcount++;                  \
-                       simple_unlock(&(lkp)->lk_interlock);            \
                        /* XXX Cast away volatile. */                   \
-                       error = tsleep((drain) ? &(lkp)->lk_flags :     \
+                       error = ltsleep((drain) ? &(lkp)->lk_flags :    \
                            (void *)(lkp), (lkp)->lk_prio,              \
-                           (lkp)->lk_wmesg, (lkp)->lk_timo);           \
-                       simple_lock(&(lkp)->lk_interlock);              \
+                           (lkp)->lk_wmesg, (lkp)->lk_timo,            \
+                           &(lkp)->lk_interlock);                      \
                        if ((drain) == 0)                               \
                                (lkp)->lk_waitcount--;                  \
                        if (error)                                      \



Home | Main Index | Thread Index | Old Index