From nobody Tue Nov 26 21:32:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XybQF62CPz5f3GG; Tue, 26 Nov 2024 21:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XybQF5TtNz4CtR; Tue, 26 Nov 2024 21:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732656757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oGyrtT2/9DNT0BhFMJDf12w8tII1hBQq2n5nYOz0AnM=; b=YJr3NL5GjjFrhLR/HVa4giDTJBD5c1zRKmYCboG17M3O+58JwjFu39z39TQMviPOx6GdfI dbvMeQHUVP+vxhi/3FX/7hcOwLxm1/EOdwj1AgbarRwUB2HO+PS5b7y+dHDkEMOKpbRtdp yiHucIqobhiiRpF+FIEIRgKbE1fkEEtTa4GVHcJLHROhJtZ88YmiRr/I4jE3rNo7Xb1fL5 nmqZ7C9fPJdWo3jXHXIhmK6GQrR/3AV3IVJwPKGkcUWFv4jVo8i9jRWzU37MOMdmlVdny2 GF6LcvsHK5XSgF8XWCELX4Gs9c4hT17jMFn59hDJg7MaUOJxvLFQXKCMPTRGpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732656757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oGyrtT2/9DNT0BhFMJDf12w8tII1hBQq2n5nYOz0AnM=; b=S0VOdJirR54u1UTJnz8SD+uZwJu/Q/68dF4RqEAdofKHSqmThMz8IZp8TgmiC97GRwaj0E 232VJQPzIiQw/mm1JAsEQ7RnpBzw318RO4qGvRdJF4OxFbObOlR9dO3BIAbrHWmZWPen2L euY/dXu+D1pTFYjUbhfh8HeqEyV2h63wBYe1lGFm98ZmmUrasEGZ1TljR9omL+X6EGvxmg TLfIZnXwdNt/CchrqRyjI6U/DniMFZjXor4HyKAD+8UNq4LkBxNOWdw+adQuKnZbj/Hadw iMkJMHYmVlh1KxzAP7gAeEZMQhnQWaV/RozrFXSdIBKOH1q7GQWVbvh+MVK/7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732656757; a=rsa-sha256; cv=none; b=YVPE6QGnwtKU3MNqyjwScVxrmV7vdRZAGiB4dxMtwxMQWgEi6KN/CJecQqHgoX3y9wcgsy dthsLdYIn+4zmDTyfsyir/h4UHAu+TFSK5fwWFhl1+N1mxeQV5mDWA9SZrinhpRAeA/r3a jdn3vmwXrnsKwBFVsENCRtqKOag4bTZWd5p28DYrnXgyu3hL7OA/pGmalLnsWekgMkEkIY 2QXDKlRthpHeog4fEFKPlNGylgVFVjT4UOET2tj/UOvXpJoiy5V8o0mb3SsyeyvWwulHsW Sa8aiPn5OugW8gauRPlhvrRVN/qJTIhr8/c86gGxUEaLTDoGGq68CUB7QHdAxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XybQF55BMzhm2; Tue, 26 Nov 2024 21:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AQLWbu8046356; Tue, 26 Nov 2024 21:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AQLWbkn046353; Tue, 26 Nov 2024 21:32:37 GMT (envelope-from git) Date: Tue, 26 Nov 2024 21:32:37 GMT Message-Id: <202411262132.4AQLWbkn046353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f06b747118cb - main - kevent: Use designated array indices to initialize the sysfilt_ops table List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f06b747118cb47212bfc178993171007ee7e9424 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f06b747118cb47212bfc178993171007ee7e9424 commit f06b747118cb47212bfc178993171007ee7e9424 Author: Mark Johnston AuthorDate: 2024-11-19 22:40:08 +0000 Commit: Mark Johnston 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 }, }; /*