summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.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/kern_sig.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/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 97592e86395..ba9f425a705 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.255 2020/03/20 08:14:07 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.256 2020/04/07 13:27:51 visa Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1811,7 +1811,7 @@ filt_sigattach(struct knote *kn)
kn->kn_flags |= EV_CLEAR; /* automatically set */
/* XXX lock the proc here while adding to the list? */
- SLIST_INSERT_HEAD(&pr->ps_klist, kn, kn_selnext);
+ klist_insert(&pr->ps_klist, kn);
return (0);
}
@@ -1821,7 +1821,7 @@ filt_sigdetach(struct knote *kn)
{
struct process *pr = kn->kn_ptr.p_process;
- SLIST_REMOVE(&pr->ps_klist, kn, knote, kn_selnext);
+ klist_remove(&pr->ps_klist, kn);
}
/*