This avoids verb overlap with f_modify.
-/* $OpenBSD: kern_event.c,v 1.180 2022/02/11 07:25:50 visa Exp $ */
+/* $OpenBSD: kern_event.c,v 1.181 2022/02/13 12:58:46 visa Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
int active;
mtx_enter(&kq->kq_lock);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
active = filt_kqueue_common(kn, kq);
mtx_leave(&kq->kq_lock);
mtx_leave(&kq->kq_lock);
kn->kn_data = 0;
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
/* Reinit timeout to invoke tick adjustment again. */
timeout_set(to, filt_timerexpire, kn);
filt_timer_timeout_add(kn);
int
filt_seltruemodify(struct kevent *kev, struct knote *kn)
{
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
return (kn->kn_fop->f_event(kn, 0));
}
} else {
/* Emulate f_modify using f_event. */
s = splhigh();
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
active = kn->kn_fop->f_event(kn, 0);
splx(s);
}
}
/*
- * Modify the knote's parameters.
+ * Assign parameters to the knote.
*
* The knote's object lock must be held.
*/
void
-knote_modify(const struct kevent *kev, struct knote *kn)
+knote_assign(const struct kevent *kev, struct knote *kn)
{
if ((kn->kn_fop->f_flags & FILTEROP_MPSAFE) == 0)
KERNEL_ASSERT_LOCKED();
-/* $OpenBSD: sys_pipe.c,v 1.134 2022/02/12 14:07:26 visa Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.135 2022/02/13 12:58:46 visa Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
int active;
rw_enter_write(rpipe->pipe_lock);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
active = kn->kn_fop->f_event(kn, 0);
rw_exit_write(rpipe->pipe_lock);
-/* $OpenBSD: uipc_socket.c,v 1.271 2021/12/24 06:50:16 visa Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.272 2022/02/13 12:58:46 visa Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_soread_common(kn, so);
sounlock(so, s);
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_sowrite_common(kn, so);
sounlock(so, s);
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_soexcept_common(kn, so);
sounlock(so, s);
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_solisten_common(kn, so);
sounlock(so, s);
-/* $OpenBSD: fifo_vnops.c,v 1.90 2021/12/14 15:53:42 visa Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.91 2022/02/13 12:58:46 visa Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_fiforead_common(kn, so);
sounlock(so, s);
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_fifowrite_common(kn, so);
sounlock(so, s);
int rv, s;
s = solock(so);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
rv = filt_fifoexcept_common(kn, so);
sounlock(so, s);
-/* $OpenBSD: bpf.c,v 1.212 2022/02/11 07:28:29 visa Exp $ */
+/* $OpenBSD: bpf.c,v 1.213 2022/02/13 12:58:46 visa Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
int active;
mtx_enter(&d->bd_mtx);
- knote_modify(kev, kn);
+ knote_assign(kev, kn);
active = filt_bpfread_common(kn, d);
mtx_leave(&d->bd_mtx);
-/* $OpenBSD: event.h,v 1.64 2022/02/11 07:27:07 visa Exp $ */
+/* $OpenBSD: event.h,v 1.65 2022/02/13 12:58:46 visa Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
extern void knote(struct klist *list, long hint);
extern void knote_fdclose(struct proc *p, int fd);
extern void knote_processexit(struct proc *);
-extern void knote_modify(const struct kevent *, struct knote *);
+extern void knote_assign(const struct kevent *, struct knote *);
extern void knote_submit(struct knote *, struct kevent *);
extern void kqueue_init(void);
extern void kqueue_init_percpu(void);