Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern sleepq_t is now a LIST. Forgot to...



details:   https://anonhg.NetBSD.org/src/rev/2f0c02de80a4
branches:  trunk
changeset: 746276:2f0c02de80a4
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Mar 26 22:40:10 2020 +0000

description:
sleepq_t is now a LIST.  Forgot to commit earlier.

diffstat:

 sys/rump/librump/rumpkern/sleepq.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r af2aa53d64e5 -r 2f0c02de80a4 sys/rump/librump/rumpkern/sleepq.c
--- a/sys/rump/librump/rumpkern/sleepq.c        Thu Mar 26 21:31:55 2020 +0000
+++ b/sys/rump/librump/rumpkern/sleepq.c        Thu Mar 26 22:40:10 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sleepq.c,v 1.17 2016/01/26 23:12:18 pooka Exp $        */
+/*     $NetBSD: sleepq.c,v 1.18 2020/03/26 22:40:10 ad Exp $   */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.17 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.18 2020/03/26 22:40:10 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -58,7 +58,7 @@
 
        RUN_ONCE(&sqctl, sqinit1);
 
-       TAILQ_INIT(sq);
+       LIST_INIT(sq);
 }
 
 void
@@ -69,7 +69,7 @@
        l->l_wchan = wc;
        l->l_wmesg = wmsg;
        l->l_sleepq = sq;
-       TAILQ_INSERT_TAIL(sq, l, l_sleepchain);
+       LIST_INSERT_HEAD(sq, l, l_sleepchain);
 }
 
 int
@@ -85,7 +85,7 @@
                error = cv_timedwait(&sq_cv, mp, timo);
                if (error == EWOULDBLOCK || error == EINTR) {
                        if (l->l_wchan) {
-                               TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain);
+                               LIST_REMOVE(l, l_sleepchain);
                                l->l_wchan = NULL;
                                l->l_wmesg = NULL;
                        }
@@ -105,13 +105,13 @@
        struct lwp *l, *l_next;
        bool found = false;
 
-       for (l = TAILQ_FIRST(sq); l; l = l_next) {
-               l_next = TAILQ_NEXT(l, l_sleepchain);
+       for (l = LIST_FIRST(sq); l; l = l_next) {
+               l_next = LIST_NEXT(l, l_sleepchain);
                if (l->l_wchan == wchan) {
                        found = true;
                        l->l_wchan = NULL;
                        l->l_wmesg = NULL;
-                       TAILQ_REMOVE(sq, l, l_sleepchain);
+                       LIST_REMOVE(l, l_sleepchain);
                        if (--expected == 0)
                                break;
                }
@@ -128,7 +128,7 @@
 
        l->l_wchan = NULL;
        l->l_wmesg = NULL;
-       TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain);
+       LIST_REMOVE(l, l_sleepchain);
        cv_broadcast(&sq_cv);
 
        if (cleanup) {



Home | Main Index | Thread Index | Old Index