kqueue: retire knlist_init_rw_reader()
Last usage was removed in afa85850e79c1839ec33efa1138206687b952cfa. Reviewed by: pauamma, melifaro, kib Differential Revision: https://reviews.freebsd.org/D36205
This commit is contained in:
parent
8338690a0a
commit
3454a7caa0
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
|
||||
#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 @@ 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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user