[syslinux:elflink] elflink: Add _module_unload() prototype to module.h

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Apr 17 11:24:11 PDT 2012


Commit-ID:  ca5a008e119fd83866bface7037ae46ceb326980
Gitweb:     http://www.syslinux.org/commit/ca5a008e119fd83866bface7037ae46ceb326980
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 2 Apr 2012 11:50:03 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 10:58:33 +0100

elflink: Add _module_unload() prototype to module.h

Commit 8e0ed96bff7 ("elf: Support __constructor and __destructor")
failed to add a prototype for the newly introduced _module_unload()
function, which resulted in the following build warning being
introduced,

sys/module/exec.c: In function ‘spawn_load’:
sys/module/exec.c:222:3: warning: implicit declaration of function ‘_module_unload’

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/include/sys/module.h |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/com32/include/sys/module.h b/com32/include/sys/module.h
index 00d6331..fb6a1eb 100644
--- a/com32/include/sys/module.h
+++ b/com32/include/sys/module.h
@@ -246,9 +246,10 @@ extern int module_load_shallow(struct elf_module *module, Elf32_Addr base_addr);
  * module_unload - unloads the module from the system.
  * @module: the module descriptor structure.
  *
- * The function checks to see whether the module can be safely removed, then
- * it releases all the associated memory. This function can be applied both
- * for standard modules and for shallow modules.
+ * The function checks to see whether the module can be safely
+ * removed, then it executes any destructors and releases all the
+ * associated memory. This function can be applied both for standard
+ * modules and for shallow modules.
  *
  * A module can be safely removed from the system when no other modules reference
  * symbols from it.
@@ -256,6 +257,14 @@ extern int module_load_shallow(struct elf_module *module, Elf32_Addr base_addr);
 extern int module_unload(struct elf_module *module);
 
 /**
+ * _module_unload - unloads the module without running destructors
+ *
+ * This function is the same as module_unload(), except that the
+ * module's destructors are not executed.
+ */
+extern int _module_unload(struct elf_module *module);
+
+/**
  * module_unload - unloads the module from the system.
  * @module: the module descriptor structure.
  *


More information about the Syslinux-commits mailing list