From nobody Sun Aug 21 05:23:34 2022 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 4M9P6G4Bdbz1HZ1W; Sun, 21 Aug 2022 05:23:34 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M9P6G3fXGz3WjN; Sun, 21 Aug 2022 05:23:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661059414; 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=hXm+SHGJFyxG/Z7SX7MYPM9EKtmYuz+pkbL6Z8csN5k=; b=DjwWxZVJMWvl6pCfe0Zc/06bftfyGkC0HFzobpz9e35tOY+fS3jQLae/MzFJx74lNd4zbt jVTVufQvHI1y2U1ZAB3/koIc7kUTSkANw5hshxbGKGnnpWN92cPJRmOzpMvZTsaxMd4GWK N32sEiRMhbc2ephQYpQCR06UPr4783GnaUzzkin6t77D4PeDXmIedxaKXggxUX7X2XcLiq g1x5o0PeHTiznp92jP7XbiqzJkPe5iPSWHM4GrX8BCBGluRhhQlUJki+utr2y0/GX8cpL+ 3I9+SckBX6iqkx+HA2/7/GjO5X5J0eP2QYApEX1TVy1Zjk2NI1i2IS6PfBAfWw== 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 4M9P6G2jTHz10D4; Sun, 21 Aug 2022 05:23:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27L5NYLD096251; Sun, 21 Aug 2022 05:23:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27L5NYH9096250; Sun, 21 Aug 2022 05:23:34 GMT (envelope-from git) Date: Sun, 21 Aug 2022 05:23:34 GMT Message-Id: <202208210523.27L5NYH9096250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 3454a7caa053 - main - kqueue: retire knlist_init_rw_reader() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3454a7caa053a2f44ad20216f908f472e9d43f1e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661059414; 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=hXm+SHGJFyxG/Z7SX7MYPM9EKtmYuz+pkbL6Z8csN5k=; b=tD3LiRgoHy9gVTs6eWl+N7lTB0T6VAXEL+8Lnv1YURUQHoMN0HyQ65SenKpRZeb3HyFa8I q8HdI/GUWKvhrFkgcKeYhJxbLgs6CrEchpuAhEt5iureAc6Ucan8jti2jIxkkPartLwSuY URzfzB4V8aWWoVqRyoyS158Vro+tAeS9M46sAnTo5WdV+/aCoCXxXLewIZkMJGvDVkxTEn 0AknODbf+xbmc6ORCNkWJh40gNdZpsI7DxgHbk17094Q+1hHdGO4H8Id0L0s1c/I8FWBjs 1Bo+rcFQjEGecWRJWAExGc3zKnE+HIeHlL8s3WYdXVPuX8Uj2/J+Cxt45qEVLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661059414; a=rsa-sha256; cv=none; b=xTJFE4E7owtRK3TPqEAvRWay7i+EW6CU7NXFtCfuy/6g9sOEfOHT36CR7xHB9V3snzxLAP d3mI0eVodekJxU/dPiVvJi0AbfgxLk9J1r2APvreCxemmrH3UTrXp1+XDDUdLGy5yhYq5B M4hgVJyCK9BIMYDyB/8xLQ3pGWmlYzXP4RaV8Cr/KNJTlyQhbWCq7e+vb2T6tKYcFS2JD6 MerxWn/8CHQ/uS6VKSYHxwV8oR2hHO40qFpO6+gbDII6ylMIfOcMfGTcqfkcrleN3QUfby BZGeh8iAQK2DUv3Hcn8aUQHJ/vEOYvOLAvy6n+LpEHOTd7LAgFS1jmqfVeKzWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=3454a7caa053a2f44ad20216f908f472e9d43f1e commit 3454a7caa053a2f44ad20216f908f472e9d43f1e Author: Robert Wing AuthorDate: 2022-08-21 05:17:39 +0000 Commit: Robert Wing CommitDate: 2022-08-21 05:17:39 +0000 kqueue: retire knlist_init_rw_reader() Last usage was removed in afa85850e79c1839ec33efa1138206687b952cfa. Reviewed by: pauamma, melifaro, kib Differential Revision: https://reviews.freebsd.org/D36205 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/kqueue.9 | 24 ++++-------------------- sys/kern/kern_event.c | 33 --------------------------------- sys/sys/event.h | 1 - 5 files changed, 7 insertions(+), 55 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index d7b622bc496c..66aa0c9c807d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20220820: remove knlist_init_rw_reader() +OLD_FILES+=usr/share/man/man9/knlist_init_rw_reader.9.gz + # 20220813: minigzip(1) removed in favor of gzip(1) OLD_FILES+=usr/bin/minigzip OLD_FILES+=usr/share/man/man1/minigzip.1.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 1913f03a48fd..b99575b595ed 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1366,7 +1366,6 @@ MLINKS+=kqueue.9 knlist_add.9 \ kqueue.9 knlist_empty.9 \ kqueue.9 knlist_init.9 \ kqueue.9 knlist_init_mtx.9 \ - kqueue.9 knlist_init_rw_reader.9 \ kqueue.9 knlist_remove.9 \ kqueue.9 knlist_remove_inevent.9 \ kqueue.9 knote_fdclose.9 \ diff --git a/share/man/man9/kqueue.9 b/share/man/man9/kqueue.9 index 53f55b8efe03..15a430d4a5a3 100644 --- a/share/man/man9/kqueue.9 +++ b/share/man/man9/kqueue.9 @@ -24,14 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2021 +.Dd August 20, 2022 .Dt KQUEUE 9 .Os .Sh NAME .Nm kqueue_add_filteropts , kqueue_del_filteropts , .Nm kqfd_register , .Nm knote_fdclose , -.Nm knlist_init , knlist_init_mtx , knlist_init_rw_reader , +.Nm knlist_init , knlist_init_mtx , .Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty , .Nm knlist_clear , knlist_delete , knlist_destroy , .Nm KNOTE_LOCKED , KNOTE_UNLOCKED @@ -57,8 +57,6 @@ .Ft void .Fn knlist_init_mtx "struct knlist *knl" "struct mtx *lock" .Ft void -.Fn knlist_init_rw_reader "struct knlist *knl" "struct rwlock *lock" -.Ft void .Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked" .Ft void .Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked" @@ -260,10 +258,9 @@ is not required, but is commonly used. If used, the .Vt knlist must be initialized with either -.Fn knlist_init , -.Fn knlist_init_mtx +.Fn knlist_init or -.Fn knlist_init_rw_reader . +.Fn knlist_init_mtx . The .Vt knlist structure may be embedded into the object structure. @@ -308,19 +305,6 @@ style lock. .Pp The function -.Fn knlist_init_rw_reader -may be used to initialize a -.Vt knlist -when -.Fa lock -is a -.Xr rwlock 9 -read lock. -Lock is acquired via -.Fn rw_rlock -function. -.Pp -The function .Fn knlist_empty returns true when there are no .Vt knotes diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 5b24741028a9..f952a5f00340 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -2506,30 +2505,6 @@ knlist_mtx_assert_lock(void *arg, int what) mtx_assert((struct mtx *)arg, MA_NOTOWNED); } -static void -knlist_rw_rlock(void *arg) -{ - - rw_rlock((struct rwlock *)arg); -} - -static void -knlist_rw_runlock(void *arg) -{ - - rw_runlock((struct rwlock *)arg); -} - -static void -knlist_rw_assert_lock(void *arg, int what) -{ - - if (what == LA_LOCKED) - rw_assert((struct rwlock *)arg, RA_LOCKED); - else - rw_assert((struct rwlock *)arg, RA_UNLOCKED); -} - void knlist_init(struct knlist *knl, void *lock, void (*kl_lock)(void *), void (*kl_unlock)(void *), @@ -2575,14 +2550,6 @@ knlist_alloc(struct mtx *lock) return (knl); } -void -knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock) -{ - - knlist_init(knl, lock, knlist_rw_rlock, knlist_rw_runlock, - knlist_rw_assert_lock); -} - void knlist_destroy(struct knlist *knl) { diff --git a/sys/sys/event.h b/sys/sys/event.h index 05eddfd681b1..1007b88828ae 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -337,7 +337,6 @@ int knlist_empty(struct knlist *knl); void knlist_init(struct knlist *knl, void *lock, void (*kl_lock)(void *), void (*kl_unlock)(void *), void (*kl_assert_lock)(void *, int)); void knlist_init_mtx(struct knlist *knl, struct mtx *lock); -void knlist_init_rw_reader(struct knlist *knl, struct rwlock *lock); void knlist_destroy(struct knlist *knl); void knlist_cleardel(struct knlist *knl, struct thread *td, int islocked, int killkn);