Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man9 Partial update for new module interfaces. Th...
details: https://anonhg.NetBSD.org/src/rev/f57c59cb8752
branches: trunk
changeset: 319404:f57c59cb8752
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon May 28 22:22:54 2018 +0000
description:
Partial update for new module interfaces. This update addresses the
new accessor functions and changes to module_hold() and module_rele(),
and fixes the prototype of each module's xxx_modcmd() function.
We still need updates related to the "specificdata" and callback
changes:
specificdata_key_t module_specific_key_create(specificdata_key_t *,
specificdata_dtor_t);
void module_specific_key_delete(specificdata_key_t);
void *module_getspecific(module_t *, specificdata_key_t);
void module_setspecific(module_t *, specificdata_key_t, void *);
void *module_register_callbacks(void (*)(struct module *),
void (*)(struct module *));
void module_unregister_callbacks(void *);
XXX The various functions listed in the man page should grouped into a
XXX few logical sub-sets.
diffstat:
share/man/man9/module.9 | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
diffs (91 lines):
diff -r b1169908d0d8 -r f57c59cb8752 share/man/man9/module.9
--- a/share/man/man9/module.9 Mon May 28 21:05:16 2018 +0000
+++ b/share/man/man9/module.9 Mon May 28 22:22:54 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.9,v 1.42 2017/12/20 10:01:38 wiz Exp $
+.\" $NetBSD: module.9,v 1.43 2018/05/28 22:22:54 pgoyette Exp $
.\"
.\" Copyright (c) 2010 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 16, 2017
+.Dd May 29, 2018
.Dt MODULE 9
.Os
.Sh NAME
@@ -38,7 +38,10 @@
.Nm module_init_class ,
.Nm module_hold ,
.Nm module_rele ,
-.Nm module_find_section
+.Nm module_find_section ,
+.Nm module_kernel ,
+.Nm module_name ,
+.Nm module_source
.Nd kernel module loader
.Sh SYNOPSIS
.In sys/module.h
@@ -53,11 +56,17 @@
.Ft void
.Fn module_init_class "modclass_t class"
.Ft int
-.Fn module_hold "const char *name"
+.Fn module_hold "module_t *module"
.Ft void
-.Fn module_rele "const char *"
+.Fn module_rele "module_t *module"
.Ft int
.Fn module_find_section "const char *" "void **" "size_t *"
+.Ft "module_t *"
+.Fn module_kernel "void"
+.Ft "const char *"
+.Fn module_name "struct module *module"
+.Ft modsrc_t
+.Fn module_source "struct module *module"
.Ft void
.Fn module_init "void"
.Ft void
@@ -150,7 +159,7 @@
function.
This function is defined as:
.Bl -tag -width modcmd -offset indent
-.It Ft int
+.It Ft modcmd_t
.Fn xxx_modcmd "modcmd_t cmd" "void *data"
.El
.Pp
@@ -383,10 +392,10 @@
.Fa class .
Any built-in modules that have not been disabled, and any modules provided
by the boot loader are loaded.
-.It Fn module_hold "name"
+.It Fn module_hold "module"
Increment the reference count of a module.
A module cannot be unloaded if its reference count is non-zero.
-.It Fn module_rele "name"
+.It Fn module_rele "module"
Decrement the reference count of a module.
.It Fn module_find_section "name" "addr" "size"
Find the start address and size of linker section
@@ -396,6 +405,18 @@
embedded file system image.
This routine can only examine the linker data for the module that is
currently being initialized; it cannot examine data for any other module.
+.It Fn module_kernel "void"
+Returns a pointer to a
+.Ft module_t
+structure describing the kernel module.
+.It Fn module_name module
+Returns a pointer to the module's name.
+.It Fn module_source module
+Returns the source of the module, one of
+.Dv MODULE_SOURCE_KERNEL ,
+.Dv MODULE_SOURCE_BOOT ,
+or
+.Dv MODULE_SOURCE_FILESYS .
.It Fn module_init "void"
Initialize the module subsystem.
Creates and initializes various data structures, locates all built-in
Home |
Main Index |
Thread Index |
Old Index