Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man9 Document interaction of SYSCTL_SETUP function...
details: https://anonhg.NetBSD.org/src/rev/5426faf4dbd8
branches: trunk
changeset: 453328:5426faf4dbd8
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Aug 07 13:22:00 2019 +0000
description:
Document interaction of SYSCTL_SETUP functions and the module loader.
diffstat:
share/man/man9/sysctl.9 | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r fca686672851 -r 5426faf4dbd8 share/man/man9/sysctl.9
--- a/share/man/man9/sysctl.9 Wed Aug 07 12:36:36 2019 +0000
+++ b/share/man/man9/sysctl.9 Wed Aug 07 13:22:00 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: sysctl.9,v 1.20 2017/07/03 21:28:48 wiz Exp $
+.\" $NetBSD: sysctl.9,v 1.21 2019/08/07 13:22:00 pgoyette Exp $
.\"
.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd December 4, 2011
+.Dd August 7, 2019
.Dt SYSCTL 9
.Os
.Sh NAME
@@ -547,7 +547,7 @@
.Fa oldlenp
to zero, and returns success.
.Sh SETUP FUNCTIONS
-Though nodes can be added to the SYSCTL tree at any time, in order to
+Although nodes can be added to the SYSCTL tree at any time, in order to
add nodes during the kernel bootstrap phase, a proper
.Dq setup
function must be used.
@@ -561,9 +561,17 @@
kernel configuration in
.Xr options 4 .
.Pc
+.Pp
The address of the function is added to a list of functions that
.Fn sysctl_init
traverses during initialization.
+For loadable kernel modules (see
+.Xr modules 9 ) ,
+the list of functions is called from the module loader after the module's
+initialization routine.
+Any sysctl nodes created for the loadable module are removed using
+.Fn sysctl_teardown
+before calling the module's termination code.
.Pp
Setup functions do not have to add nodes to the main tree, but can set
up their own trees for emulation or other purposes.
Home |
Main Index |
Thread Index |
Old Index