]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
config_intrhook: provide config_intrhook_drain
authorWarner Losh <imp@FreeBSD.org>
Thu, 11 Mar 2021 15:42:09 +0000 (08:42 -0700)
committerWarner Losh <imp@FreeBSD.org>
Mon, 12 Jul 2021 19:30:55 +0000 (13:30 -0600)
commitd765d5c2c30971f109723ea4af6245e8dd201d3a
treed330e90f0c7e66dc69cbaffc3213eef400755296
parent9428c3c912db68ca58e0f947c6e77e51454d92ee
config_intrhook: provide config_intrhook_drain

config_intrhook_drain will remove the hook from the list as
config_intrhook_disestablish does if the hook hasn't been called.  If it has,
config_intrhook_drain will wait for the hook to be disestablished in the normal
course (or expedited, it's up to the driver to decide how and when
to call config_intrhook_disestablish).

This is intended for removable devices that use config_intrhook and might be
attached early in boot, but that may be removed before the kernel can call the
config_intrhook or before it ends. To prevent all races, the detach routine will
need to call config_intrhook_train.

Sponsored by: Netflix, Inc
Reviewed by: jhb, mav, gde (in D29006 for man page)
Differential Revision: https://reviews.freebsd.org/D29005

(cherry picked from commit e52368365db3c0a696b37bfc09d08b7093b41b57)
share/man/man9/Makefile
share/man/man9/config_intrhook.9
sys/kern/subr_autoconf.c
sys/sys/kernel.h