path: root/sys/sys/module.h
diff options
authorJohn Baldwin <jhb@FreeBSD.org>2008-12-05 13:40:25 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2008-12-05 13:40:25 +0000
commitb4824b48b4829bfcf7fe3f57ea01e854ce0c9ab4 (patch)
treea8522c6b0e4d16f7f55489f7822e5cbf7405ddf4 /sys/sys/module.h
parent482b7172da61346880df580e23d3af7860281366 (diff)
- 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
Notes: svn path=/head/; revision=185635
Diffstat (limited to 'sys/sys/module.h')
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h
index 6fbf5244dcb1..2abad63f9ecb 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);