git: f06b747118cb - main - kevent: Use designated array indices to initialize the sysfilt_ops table
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Nov 2024 21:32:37 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f06b747118cb47212bfc178993171007ee7e9424 commit f06b747118cb47212bfc178993171007ee7e9424 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-11-19 22:40:08 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-11-26 20:57:10 +0000 kevent: Use designated array indices to initialize the sysfilt_ops table This makes it a bit easier to see where operations on a particular filter are defined. No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay --- sys/kern/kern_event.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 41295c374e65..fa96fbad20ce 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -346,19 +346,19 @@ static struct { int for_nolock; int for_refcnt; } sysfilt_ops[EVFILT_SYSCOUNT] = { - { &file_filtops, 1 }, /* EVFILT_READ */ - { &file_filtops, 1 }, /* EVFILT_WRITE */ - { &null_filtops }, /* EVFILT_AIO */ - { &file_filtops, 1 }, /* EVFILT_VNODE */ - { &proc_filtops, 1 }, /* EVFILT_PROC */ - { &sig_filtops, 1 }, /* EVFILT_SIGNAL */ - { &timer_filtops, 1 }, /* EVFILT_TIMER */ - { &file_filtops, 1 }, /* EVFILT_PROCDESC */ - { &fs_filtops, 1 }, /* EVFILT_FS */ - { &null_filtops }, /* EVFILT_LIO */ - { &user_filtops, 1 }, /* EVFILT_USER */ - { &null_filtops }, /* EVFILT_SENDFILE */ - { &file_filtops, 1 }, /* EVFILT_EMPTY */ + [~EVFILT_READ] = { &file_filtops, 1 }, + [~EVFILT_WRITE] = { &file_filtops, 1 }, + [~EVFILT_AIO] = { &null_filtops }, + [~EVFILT_VNODE] = { &file_filtops, 1 }, + [~EVFILT_PROC] = { &proc_filtops, 1 }, + [~EVFILT_SIGNAL] = { &sig_filtops, 1 }, + [~EVFILT_TIMER] = { &timer_filtops, 1 }, + [~EVFILT_PROCDESC] = { &file_filtops, 1 }, + [~EVFILT_FS] = { &fs_filtops, 1 }, + [~EVFILT_LIO] = { &null_filtops }, + [~EVFILT_USER] = { &user_filtops, 1 }, + [~EVFILT_SENDFILE] = { &null_filtops }, + [~EVFILT_EMPTY] = { &file_filtops, 1 }, }; /*