Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/f14764fb861e
branches:  trunk
changeset: 947904:f14764fb861e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Dec 19 22:11:57 2020 +0000

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

diffstat:

 sys/arch/x68k/dev/event.c |  10 ++++------
 sys/coda/coda_psdev.c     |  10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diffs (100 lines):

diff -r 3cc3c0b780da -r f14764fb861e sys/arch/x68k/dev/event.c
--- a/sys/arch/x68k/dev/event.c Sat Dec 19 22:10:56 2020 +0000
+++ b/sys/arch/x68k/dev/event.c Sat Dec 19 22:11:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: event.c,v 1.16 2020/05/23 23:42:41 ad Exp $ */
+/*     $NetBSD: event.c,v 1.17 2020/12/19 22:16:15 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.16 2020/05/23 23:42:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.17 2020/12/19 22:16:15 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/fcntl.h>
@@ -189,7 +189,7 @@
        struct evvar *ev = kn->kn_hook;
 
        mutex_enter(ev->ev_lock);
-       SLIST_REMOVE(&ev->ev_sel.sel_klist, kn, knote, kn_selnext);
+       selremove_knote(&ev->ev_sel, kn);
        mutex_exit(ev->ev_lock);
 }
 
@@ -226,11 +226,9 @@
 int
 ev_kqfilter(struct evvar *ev, struct knote *kn)
 {
-       struct klist *klist;
 
        switch (kn->kn_filter) {
        case EVFILT_READ:
-               klist = &ev->ev_sel.sel_klist;
                kn->kn_fop = &ev_filtops;
                break;
 
@@ -241,7 +239,7 @@
        kn->kn_hook = ev;
 
        mutex_enter(ev->ev_lock);
-       SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+       selrecord_knote(&ev->ev_sel, kn);
        mutex_exit(ev->ev_lock);
 
        return (0);
diff -r 3cc3c0b780da -r f14764fb861e sys/coda/coda_psdev.c
--- a/sys/coda/coda_psdev.c     Sat Dec 19 22:10:56 2020 +0000
+++ b/sys/coda/coda_psdev.c     Sat Dec 19 22:11:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: coda_psdev.c,v 1.58 2017/10/25 08:12:38 maya Exp $     */
+/*     $NetBSD: coda_psdev.c,v 1.59 2020/12/19 22:11:57 thorpej Exp $  */
 
 /*
  *
@@ -54,7 +54,7 @@
 /* These routines are the device entry points for Venus. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.58 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.59 2020/12/19 22:11:57 thorpej Exp $");
 
 extern int coda_nc_initialized;    /* Set if cache has been initialized */
 
@@ -469,7 +469,7 @@
 {
        struct vcomm *vcp = kn->kn_hook;
 
-       SLIST_REMOVE(&vcp->vc_selproc.sel_klist, kn, knote, kn_selnext);
+       selremove_knote(&vcp->vc_selproc, kn);
 }
 
 static int
@@ -497,7 +497,6 @@
 vc_nb_kqfilter(dev_t dev, struct knote *kn)
 {
        struct vcomm *vcp;
-       struct klist *klist;
 
        ENTRY;
 
@@ -508,7 +507,6 @@
 
        switch (kn->kn_filter) {
        case EVFILT_READ:
-               klist = &vcp->vc_selproc.sel_klist;
                kn->kn_fop = &vc_nb_read_filtops;
                break;
 
@@ -518,7 +516,7 @@
 
        kn->kn_hook = vcp;
 
-       SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+       selrecord_knote(&vcp->vc_selproc, kn);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index