summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2020-04-07 13:27:50 +0000
committervisa <visa@openbsd.org>2020-04-07 13:27:50 +0000
commit9c969c9ab4dbfc69101f439c13329bb852e9fe18 (patch)
tree85e62132ace95376b927a5e1d5fc9bfb8d92ce37 /sys/kern/tty.c
parentDefer selwakeup() from kqueue_wakeup() to kqueue_task() to prevent (diff)
downloadwireguard-openbsd-9c969c9ab4dbfc69101f439c13329bb852e9fe18.tar.xz
wireguard-openbsd-9c969c9ab4dbfc69101f439c13329bb852e9fe18.zip
Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions. OK mpi@, anton@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 0b72a0042db..431b22653de 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.153 2020/02/20 16:56:52 visa Exp $ */
+/* $OpenBSD: tty.c,v 1.154 2020/04/07 13:27:51 visa Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -1126,7 +1126,7 @@ ttkqfilter(dev_t dev, struct knote *kn)
kn->kn_hook = tp;
s = spltty();
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ klist_insert(klist, kn);
splx(s);
return (0);
@@ -1139,7 +1139,7 @@ filt_ttyrdetach(struct knote *kn)
int s;
s = spltty();
- SLIST_REMOVE(&tp->t_rsel.si_note, kn, knote, kn_selnext);
+ klist_remove(&tp->t_rsel.si_note, kn);
splx(s);
}
@@ -1166,7 +1166,7 @@ filt_ttywdetach(struct knote *kn)
int s;
s = spltty();
- SLIST_REMOVE(&tp->t_wsel.si_note, kn, knote, kn_selnext);
+ klist_remove(&tp->t_wsel.si_note, kn);
splx(s);
}