Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use sel{record,remove}_knote().
details: https://anonhg.NetBSD.org/src/rev/22d22a98cbc9
branches: trunk
changeset: 979156:22d22a98cbc9
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Dec 18 01:54:22 2020 +0000
description:
Use sel{record,remove}_knote().
diffstat:
sys/dev/sbus/bpp.c | 16 ++++++++--------
sys/dev/scsipi/ch.c | 11 ++++-------
sys/dev/sun/event.c | 10 ++++------
3 files changed, 16 insertions(+), 21 deletions(-)
diffs (170 lines):
diff -r 5938cd7103e0 -r 22d22a98cbc9 sys/dev/sbus/bpp.c
--- a/sys/dev/sbus/bpp.c Fri Dec 18 01:46:39 2020 +0000
+++ b/sys/dev/sbus/bpp.c Fri Dec 18 01:54:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpp.c,v 1.45 2020/05/23 23:42:42 ad Exp $ */
+/* $NetBSD: bpp.c,v 1.46 2020/12/18 02:04:17 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.45 2020/05/23 23:42:42 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.46 2020/12/18 02:04:17 thorpej Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -509,7 +509,7 @@
int s;
s = splbpp();
- SLIST_REMOVE(&sc->sc_rsel.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&sc->sc_rsel, kn);
splx(s);
}
@@ -534,7 +534,7 @@
int s;
s = splbpp();
- SLIST_REMOVE(&sc->sc_wsel.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&sc->sc_wsel, kn);
splx(s);
}
@@ -561,19 +561,19 @@
bppkqfilter(dev_t dev, struct knote *kn)
{
struct bpp_softc *sc;
- struct klist *klist;
+ struct selinfo *sip;
int s;
sc = device_lookup_private(&bpp_cd, BPPUNIT(dev));
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &sc->sc_rsel.sel_klist;
+ sip = &sc->sc_rsel;
kn->kn_fop = &bppread_filtops;
break;
case EVFILT_WRITE:
- klist = &sc->sc_wsel.sel_klist;
+ sip = &sc->sc_wsel;
kn->kn_fop = &bppwrite_filtops;
break;
@@ -584,7 +584,7 @@
kn->kn_hook = sc;
s = splbpp();
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(sip, kn);
splx(s);
return 0;
diff -r 5938cd7103e0 -r 22d22a98cbc9 sys/dev/scsipi/ch.c
--- a/sys/dev/scsipi/ch.c Fri Dec 18 01:46:39 2020 +0000
+++ b/sys/dev/scsipi/ch.c Fri Dec 18 01:54:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ch.c,v 1.92 2017/10/25 08:12:39 maya Exp $ */
+/* $NetBSD: ch.c,v 1.93 2020/12/18 01:55:22 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.92 2017/10/25 08:12:39 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.93 2020/12/18 01:55:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -473,7 +473,7 @@
{
struct ch_softc *sc = kn->kn_hook;
- SLIST_REMOVE(&sc->sc_selq.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&sc->sc_selq, kn);
}
static int
@@ -505,16 +505,13 @@
chkqfilter(dev_t dev, struct knote *kn)
{
struct ch_softc *sc = device_lookup_private(&ch_cd, CHUNIT(dev));
- struct klist *klist;
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &sc->sc_selq.sel_klist;
kn->kn_fop = &chread_filtops;
break;
case EVFILT_WRITE:
- klist = &sc->sc_selq.sel_klist;
kn->kn_fop = &chwrite_filtops;
break;
@@ -524,7 +521,7 @@
kn->kn_hook = sc;
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(&sc->sc_selq, kn);
return (0);
}
diff -r 5938cd7103e0 -r 22d22a98cbc9 sys/dev/sun/event.c
--- a/sys/dev/sun/event.c Fri Dec 18 01:46:39 2020 +0000
+++ b/sys/dev/sun/event.c Fri Dec 18 01:54:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: event.c,v 1.24 2017/10/25 08:12:39 maya Exp $ */
+/* $NetBSD: event.c,v 1.25 2020/12/18 01:54:22 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.24 2017/10/25 08:12:39 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.25 2020/12/18 01:54:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/fcntl.h>
@@ -173,7 +173,7 @@
int s;
s = splev();
- SLIST_REMOVE(&ev->ev_sel.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&ev->ev_sel, kn);
splx(s);
}
@@ -206,12 +206,10 @@
int
ev_kqfilter(struct evvar *ev, struct knote *kn)
{
- struct klist *klist;
int s;
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &ev->ev_sel.sel_klist;
kn->kn_fop = &ev_filtops;
break;
@@ -222,7 +220,7 @@
kn->kn_hook = ev;
s = splev();
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(&ev->ev_sel, kn);
splx(s);
return (0);
Home |
Main Index |
Thread Index |
Old Index