summaryrefslogtreecommitdiffstats
path: root/sys/sys/module.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-12-05 13:40:25 +0000
committerjhb <jhb@FreeBSD.org>2008-12-05 13:40:25 +0000
commit0ac14961cc48c1ab4910a0dfb21d6d4a3137f5a6 (patch)
treea8522c6b0e4d16f7f55489f7822e5cbf7405ddf4 /sys/sys/module.h
parentd57e5b9d8b3abb250cd15d2e7d49be4668ad956a (diff)
downloadFreeBSD-src-0ac14961cc48c1ab4910a0dfb21d6d4a3137f5a6.zip
FreeBSD-src-0ac14961cc48c1ab4910a0dfb21d6d4a3137f5a6.tar.gz
- Invoke MOD_QUIESCE on all modules in a linker file (kld) before
unloading any modules. As a result, if any module veto's an unload request via MOD_QUIESCE, the entire set of modules for that linker file will remain loaded and active now rather than leaving the kld in a weird state where some modules are loaded and some are unloaded. - This also moves the logic for handling the "forced" unload flag out of kern_module.c and into kern_linker.c which is a bit cleaner. - Add a module_name() routine that returns the name of a module and use that instead of printing pointer values in debug messages when a module fails MOD_QUIESCE or MOD_UNLOAD. MFC after: 1 month
Diffstat (limited to 'sys/sys/module.h')
-rw-r--r--sys/sys/module.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h
index 6fbf524..2abad63 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -154,11 +154,13 @@ void module_register_init(const void *);
int module_register(const struct moduledata *, struct linker_file *);
module_t module_lookupbyname(const char *);
module_t module_lookupbyid(int);
+int module_quiesce(module_t);
void module_reference(module_t);
void module_release(module_t);
-int module_unload(module_t, int flags);
+int module_unload(module_t);
int module_getid(module_t);
module_t module_getfnext(module_t);
+const char * module_getname(module_t);
void module_setspecific(module_t, modspecific_t *);
struct linker_file *module_file(module_t);
OpenPOWER on IntegriCloud