summaryrefslogtreecommitdiffstats
path: root/share/man/man9/kobj.9
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-08-28 21:17:46 +0000
committerdfr <dfr@FreeBSD.org>2000-08-28 21:17:46 +0000
commit00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff (patch)
tree81cbd3e47ffd536e7161d1edd9338d3760f7c157 /share/man/man9/kobj.9
parent1e7cf75b9537431c6f21ffa6e98dcabcf07ef8b4 (diff)
downloadFreeBSD-src-00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff.zip
FreeBSD-src-00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff.tar.gz
Document kobj_class_compile_static().
Diffstat (limited to 'share/man/man9/kobj.9')
-rw-r--r--share/man/man9/kobj.914
1 files changed, 13 insertions, 1 deletions
diff --git a/share/man/man9/kobj.9 b/share/man/man9/kobj.9
index 5e6c2e7..7f51d49 100644
--- a/share/man/man9/kobj.9
+++ b/share/man/man9/kobj.9
@@ -40,6 +40,8 @@
.Ft void
.Fn kobj_class_compile "kobj_class_t cls"
.Ft void
+.Fn kobj_class_compile_static "kobj_class_t cls" "kobj_ops_t ops"
+.Ft void
.Fn kobj_class_free "kobj_class_t cls"
.Ft kobj_t
.Fn kobj_create "kobj_class_t cls" "struct malloc_type *mtype" "int mflags"
@@ -96,13 +98,23 @@ The device framework uses this feature to associate drivers with
devices.
.Pp
The functions
-.Fn kobj_class_compile
+.Fn kobj_class_compile ,
+.Fn kobj_class_compile_static
and
.Fn kobj_class_free
are used to process a class description to make method dispatching
efficient.
A client should not normally need to call these since a class
will automatically be compiled the first time it is used.
+If a class is to be used before
+.Xr malloc 9
+is initialised,
+then
+.Fn kobj_class_compile_static
+should be called with the class and a pointer to a statically
+allocated
+.Dv kobj_ops
+structure before the class is used to initialise any objects.
.Pp
To define a class, first define a simple array of
.Dv kobj_method_t .
OpenPOWER on IntegriCloud