Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/qbus Use sel{record,remove}_knote().



details:   https://anonhg.NetBSD.org/src/rev/0547090c8cd9
branches:  trunk
changeset: 947563:0547090c8cd9
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Dec 18 02:41:35 2020 +0000

description:
Use sel{record,remove}_knote().

diffstat:

 sys/dev/qbus/qd.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 34abf410f3f2 -r 0547090c8cd9 sys/dev/qbus/qd.c
--- a/sys/dev/qbus/qd.c Fri Dec 18 02:29:50 2020 +0000
+++ b/sys/dev/qbus/qd.c Fri Dec 18 02:41:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qd.c,v 1.57 2017/10/25 08:12:38 maya Exp $     */
+/*     $NetBSD: qd.c,v 1.58 2020/12/18 02:41:35 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1988 Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.57 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.58 2020/12/18 02:41:35 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -1548,7 +1548,7 @@
        int s;
 
        s = spl5();
-       SLIST_REMOVE(&qdrsel[unit].sel_klist, kn, knote, kn_selnext);
+       selremove_knote(&qdrsel[unit], kn);
        splx(s);
 }
 
@@ -1597,7 +1597,6 @@
 int
 qdkqfilter(dev_t dev, struct knote *kn)
 {
-       struct klist *klist;
        u_int minor_dev = minor(dev);
        int s, unit = minor_dev >> 2;
 
@@ -1608,12 +1607,10 @@
 
        switch (kn->kn_filter) {
        case EVFILT_READ:
-               klist = &qdrsel[unit].sel_klist;
                kn->kn_fop = &qdread_filtops;
                break;
 
        case EVFILT_WRITE:
-               klist = &qdrsel[unit].sel_klist;
                kn->kn_fop = &qdwrite_filtops;
                break;
 
@@ -1624,7 +1621,7 @@
        kn->kn_hook = (void *)(intptr_t) dev;
 
        s = spl5();
-       SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+       selrecord_knote(&qdrsel[unit], kn);
        splx(s);
 
        return (0);



Home | Main Index | Thread Index | Old Index