aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/module.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-05-08 13:01:59 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-05-08 13:01:59 +0000
commitb5b15c3ff0c3d7db03c0171f113ac6bd332ad87d (patch)
treedc1ad9f6e80212b064a64e87369ace6a5995f47b /sys/sys/module.h
parent05aec5db2405ce2eb48ecdb1c2241b47dfb485aa (diff)
downloadsrc-b5b15c3ff0c3d7db03c0171f113ac6bd332ad87d.tar.gz
src-b5b15c3ff0c3d7db03c0171f113ac6bd332ad87d.zip
First stages of a module dependency cleanup. This part fixes a
particularly annoying hack, namely having the linker bash the moduledata to set the container pointer, preventing it being const. In the process, a stack of warnings were fixed and will probably allow a revisit of the const C_SYSINIT() changes. This explicitly registers modules in files or preload areas with the module system first, and let them initialize via SYSINIT/DECLARE_MODULE later in their SI_ORDER_xxx order. The kludge of finding the containing file is no longer needed since the registration of modules onto the modules list is done in the context of initializing the linker file.
Notes
Notes: svn path=/head/; revision=46693
Diffstat (limited to 'sys/sys/module.h')
-rw-r--r--sys/sys/module.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h
index 05f48c297b27..45f3a405990d 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: module.h,v 1.9 1999/01/29 06:47:53 dillon Exp $
+ * $Id: module.h,v 1.10 1999/01/29 08:36:45 dillon Exp $
*/
#ifndef _SYS_MODULE_H_
@@ -47,7 +47,6 @@ typedef struct moduledata {
char *name; /* module name */
modeventhand_t evhand; /* event handler */
void *priv; /* extra data */
- void *_file; /* private; used by linker */
} moduledata_t;
/*
@@ -68,8 +67,8 @@ typedef union modspecific {
struct __hack
void module_register_init(const void *data);
-int module_register(const char *name, modeventhand_t callback, void *arg,
- void *file);
+struct linker_file;
+int module_register(const struct moduledata *data, struct linker_file *lf);
module_t module_lookupbyname(const char *name);
module_t module_lookupbyid(int modid);
void module_reference(module_t mod);