diff options
author | dfr <dfr@FreeBSD.org> | 2000-08-28 21:17:46 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-08-28 21:17:46 +0000 |
commit | 00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff (patch) | |
tree | 81cbd3e47ffd536e7161d1edd9338d3760f7c157 /share | |
parent | 1e7cf75b9537431c6f21ffa6e98dcabcf07ef8b4 (diff) | |
download | FreeBSD-src-00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff.zip FreeBSD-src-00bc2fc95a7434a3c2dcb1cbb8a6d1f05a010eff.tar.gz |
Document kobj_class_compile_static().
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 1 | ||||
-rw-r--r-- | share/man/man9/kobj.9 | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b9970ca..d378f7c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -110,6 +110,7 @@ MLINKS+=microuptime.9 getmicrouptime.9 microuptime.9 nanouptime.9 MLINKS+=microuptime.9 getnanouptime.9 MLINKS+=kobj.9 kobj_class_compile.9 +MLINKS+=kobj.9 kobj_class_compile_static.9 MLINKS+=kobj.9 kobj_class_free.9 MLINKS+=kobj.9 kobj_create.9 MLINKS+=kobj.9 kobj_init.9 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 . |