Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man9 Finish documenting the new modules(9) interfa...
details: https://anonhg.NetBSD.org/src/rev/454ec0940787
branches: trunk
changeset: 319569:454ec0940787
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jun 03 10:34:59 2018 +0000
description:
Finish documenting the new modules(9) interfaces by adding the module
specificdata routines.
diffstat:
share/man/man9/Makefile | 6 +++++-
share/man/man9/module.9 | 42 ++++++++++++++++++++++++++++++++++++++++--
2 files changed, 45 insertions(+), 3 deletions(-)
diffs (98 lines):
diff -r 404a25c55784 -r 454ec0940787 share/man/man9/Makefile
--- a/share/man/man9/Makefile Sun Jun 03 10:24:24 2018 +0000
+++ b/share/man/man9/Makefile Sun Jun 03 10:34:59 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.425 2018/06/03 09:22:34 pgoyette Exp $
+# $NetBSD: Makefile,v 1.426 2018/06/03 10:34:59 pgoyette Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -522,6 +522,7 @@
MLINKS+=module.9 module_autoload.9 \
module.9 module_builtin_require_force.9 \
module.9 module_find_section.9 \
+ module.9 module_getspecific.9 \
module.9 module_hold.9 \
module.9 module_init.9 \
module.9 module_init_class.9 \
@@ -530,7 +531,10 @@
module.9 module_load_vfs_init.9 \
module.9 module_name.9 \
module.9 module_rele.9 \
+ module.9 module_setspecific.9 \
module.9 module_source.9 \
+ module.9 module_specific_key_create.9 \
+ module.9 module_specific_key_delete.9 \
module.9 module_start_unload_thread.9 \
module.9 module_unload.9 \
module.9 module_register_callbacks.9 \
diff -r 404a25c55784 -r 454ec0940787 share/man/man9/module.9
--- a/share/man/man9/module.9 Sun Jun 03 10:24:24 2018 +0000
+++ b/share/man/man9/module.9 Sun Jun 03 10:34:59 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.9,v 1.45 2018/06/03 01:52:47 pgoyette Exp $
+.\" $NetBSD: module.9,v 1.46 2018/06/03 10:34:59 pgoyette Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -43,7 +43,11 @@
.Nm module_name ,
.Nm module_source ,
.Nm module_register_callbacks ,
-.Nm module_unregister_callbacks
+.Nm module_unregister_callbacks ,
+.Nm module_specific_key_create ,
+.Nm module_specific_key_delete ,
+.Nm module_getspecific ,
+.Nm module_setspecific
.Nd kernel module loader
.Sh SYNOPSIS
.In sys/module.h
@@ -82,6 +86,15 @@
"void (*unload)(struct module *)"
.Ft void
.Fn module_unregister_callbacks "void *"
+.Ft specificdata_key_t
+.Fn module_specific_key_create "specificdata_key_t *keyp" \
+"specificdata_dtor_t dtor"
+.Ft void
+.Fn module_specific_key_delete "specificdata_key_t key"
+.Ft "void *"
+.Fn module_getspecific "module_t *mod" "specificdata_key_t key"
+.Ft "void *"
+.Fn module_setspecific "module_t *mod" "specificdata_key_t key" "void *data"
.Sh DESCRIPTION
Modules are sections of code that can be independently linked and selectively
loaded into or unloaded from a running kernel.
@@ -479,6 +492,31 @@
argument should be the return value from the previous
.Fn module_register_callbacks
call.
+.It module_specific_key_create "specificdata_key_t *keyp" \
+"specificdata_dtor_t dtor"
+Creates a new specificdata_key for use within the
+.Nm
+domain.
+The key identifier is returned in
+.Fa keyp .
+.It module_specific_key_delete "specificdata_key_t key"
+Deletes the specified specificdata_key
+.Fa key
+from the
+.Nm domain.
+.It module_getspecific "module_t *mod" "specificdata_key_t key"
+Retrieves the value associated with
+.Fa key
+from module
+.Fa mod .
+.It module_setspecific "module_t *mod" "specificdata_key_t key" "void *data"
+Stores
+.Fa data
+as the value associated with
+.Fa key
+for module
+.Fa mod .
+
.El
.Sh PROGRAMMING CONSIDERATIONS
The module subsystem is designed to be called recursively, but only within
Home |
Main Index |
Thread Index |
Old Index