2 * trivial module support
6 typedef struct module *module_t;
7 typedef int (*modeventhand_t)(module_t, int /* modeventtype_t */, void *);
9 typedef enum modeventtype {
16 typedef struct moduledata {
17 const char *name; /* module name */
18 modeventhand_t evhand; /* event handler */
19 void *priv; /* extra data */
22 int my_mod_register(struct moduledata *mod, const char *name, int order);
24 * Hook the module descriptor, md, into our list of things to do.
25 * We should in principle respect the order of loading.
27 * XXX use the gcc .init functions
29 #define DECLARE_MODULE(a, md, c,d) \
30 moduledata_t *moddesc_##a = &md;
33 * XXX MODULE_VERSION is define in linux too
35 #define MODULE_DEPEND(a,b,c,d,e)
36 #if defined( __linux__ ) || defined( _WIN32 )
38 #define MODULE_VERSION(a,b)
41 #endif /* _SYS_MODULE_H_ */