From: dlg Date: Mon, 31 Jan 2022 05:29:22 +0000 (+0000) Subject: +kstat_destroy X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a2ae35ff5f6870e5f62303d90033dc1f9bfb9e61;p=openbsd +kstat_destroy --- diff --git a/share/man/man9/kstat_create.9 b/share/man/man9/kstat_create.9 index 4e8b36391d4..7f9b5676faf 100644 --- a/share/man/man9/kstat_create.9 +++ b/share/man/man9/kstat_create.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: kstat_create.9,v 1.2 2020/08/10 11:33:58 schwarze Exp $ +.\" $OpenBSD: kstat_create.9,v 1.3 2022/01/31 05:29:22 dlg Exp $ .\" .\" Copyright (c) 2020 David Gwynne .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 10 2020 $ +.Dd $Mdocdate: January 31 2022 $ .Dt KSTAT_CREATE 9 .Os .Sh NAME @@ -45,6 +45,8 @@ .Ft void .Fn kstat_install "struct kstat *ks" .Ft void +.Fn kstat_remove "struct kstat *ks" +.Ft void .Fn kstat_destroy "struct kstat *ks" .Sh DESCRIPTION Kernel subsystems can export statistics to userland using the kernel @@ -89,6 +91,13 @@ notifies the kstat subsystem that .Fa ks can be used to export information to userland. .Pp +.Fn kstat_remove +disables the kstat, preventing it from being used to export information +to userland. +This allows allocations referenced by the kstat struct to be released +and configuration torn down before the kstat itself is freed with +.Fn kstat_destroy . +.Pp .Fn kstat_destroy removes .Fa ks