Page MenuHomeFreeBSD

D36205.id109618.diff
No OneTemporary

D36205.id109618.diff

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
--- 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
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1366,7 +1366,6 @@
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
--- 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 @@
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 @@
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
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -45,7 +45,6 @@
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/rwlock.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/unistd.h>
@@ -2506,30 +2505,6 @@
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 @@
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
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -337,7 +337,6 @@
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);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 7:59 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14722750
Default Alt Text
D36205.id109618.diff (3 KB)

Event Timeline