summaryrefslogtreecommitdiff
path: root/sys/net/switchctl.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2020-04-07 13:27:53 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2020-04-07 13:27:53 +0000
commit31b8aeb32e081f42e1ec7f34094de4351458aed3 (patch)
tree620f7a0227efbc1b17d8b8e8b070acdf3c1c0436 /sys/net/switchctl.c
parenta469bdd2f75259dda9613501bb83503033815c3c (diff)
Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions. OK mpi@, anton@
Diffstat (limited to 'sys/net/switchctl.c')
-rw-r--r--sys/net/switchctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/switchctl.c b/sys/net/switchctl.c
index 3137aaaa186..e315dcd3773 100644
--- a/sys/net/switchctl.c
+++ b/sys/net/switchctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: switchctl.c,v 1.20 2020/02/20 16:56:52 visa Exp $ */
+/* $OpenBSD: switchctl.c,v 1.21 2020/04/07 13:27:52 visa Exp $ */
/*
* Copyright (c) 2016 Kazuya GODA <goda@openbsd.org>
@@ -409,7 +409,7 @@ switchkqfilter(dev_t dev, struct knote *kn)
kn->kn_hook = (caddr_t)sc;
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ klist_insert(klist, kn);
return (0);
}
@@ -420,7 +420,7 @@ filt_switch_rdetach(struct knote *kn)
struct switch_softc *sc = (struct switch_softc *)kn->kn_hook;
struct klist *klist = &sc->sc_swdev->swdev_rsel.si_note;
- SLIST_REMOVE(klist, kn, knote, kn_selnext);
+ klist_remove(klist, kn);
}
int
@@ -444,7 +444,7 @@ filt_switch_wdetach(struct knote *kn)
struct switch_softc *sc = (struct switch_softc *)kn->kn_hook;
struct klist *klist = &sc->sc_swdev->swdev_wsel.si_note;
- SLIST_REMOVE(klist, kn, knote, kn_selnext);
+ klist_remove(klist, kn);
}
int