Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use sel{record,remove}_knote().
details: https://anonhg.NetBSD.org/src/rev/ee287771b66e
branches: trunk
changeset: 1017678:ee287771b66e
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jan 04 15:29:34 2021 +0000
description:
Use sel{record,remove}_knote().
diffstat:
sys/arch/sandpoint/sandpoint/satmgr.c | 8 +++-----
sys/arch/sparc/dev/tctrl.c | 10 ++++------
2 files changed, 7 insertions(+), 11 deletions(-)
diffs (88 lines):
diff -r 5a8f43b57a64 -r ee287771b66e sys/arch/sandpoint/sandpoint/satmgr.c
--- a/sys/arch/sandpoint/sandpoint/satmgr.c Mon Jan 04 15:14:32 2021 +0000
+++ b/sys/arch/sandpoint/sandpoint/satmgr.c Mon Jan 04 15:29:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.28 2018/09/03 16:29:27 riastradh Exp $ */
+/* $NetBSD: satmgr.c,v 1.29 2021/01/04 15:36:22 thorpej Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -589,7 +589,7 @@
struct satmgr_softc *sc = kn->kn_hook;
mutex_enter(&sc->sc_lock);
- SLIST_REMOVE(&sc->sc_rsel.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&sc->sc_rsel, kn);
mutex_exit(&sc->sc_lock);
}
@@ -613,11 +613,9 @@
satkqfilter(dev_t dev, struct knote *kn)
{
struct satmgr_softc *sc = device_lookup_private(&satmgr_cd, 0);
- struct klist *klist;
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &sc->sc_rsel.sel_klist;
kn->kn_fop = &read_filtops;
break;
@@ -628,7 +626,7 @@
kn->kn_hook = sc;
mutex_enter(&sc->sc_lock);
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(&sc->sc_rsel, kn);
mutex_exit(&sc->sc_lock);
return 0;
diff -r 5a8f43b57a64 -r ee287771b66e sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c Mon Jan 04 15:14:32 2021 +0000
+++ b/sys/arch/sparc/dev/tctrl.c Mon Jan 04 15:29:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tctrl.c,v 1.62 2020/06/13 05:31:28 jdc Exp $ */
+/* $NetBSD: tctrl.c,v 1.63 2021/01/04 15:29:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.62 2020/06/13 05:31:28 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.63 2021/01/04 15:29:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1218,7 +1218,7 @@
int s;
s = splts102();
- SLIST_REMOVE(&sc->sc_rsel.sel_klist, kn, knote, kn_selnext);
+ selremove_knote(&sc->sc_rsel, kn);
splx(s);
}
@@ -1243,12 +1243,10 @@
{
struct tctrl_softc *sc = device_lookup_private(&tctrl_cd,
TCTRL_STD_DEV);
- struct klist *klist;
int s;
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &sc->sc_rsel.sel_klist;
kn->kn_fop = &tctrlread_filtops;
break;
@@ -1259,7 +1257,7 @@
kn->kn_hook = sc;
s = splts102();
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(&sc->sc_rsel, kn);
splx(s);
return (0);
Home |
Main Index |
Thread Index |
Old Index