From ca5a008e119fd83866bface7037ae46ceb326980 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Mon, 2 Apr 2012 11:50:03 +0100 Subject: [PATCH] elflink: Add _module_unload() prototype to module.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- com32/include/sys/module.h | 15 ++++++++++++--- 1 file 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. * -- 2.7.4