Date: 22 Jul 2001 14:01:09 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: arch@FreeBSD.ORG Subject: Re: moving struct module out of kern_module.c Message-ID: <xzpn15xqika.fsf@flood.ping.uio.no> In-Reply-To: <xzpr8v9qina.fsf@flood.ping.uio.no> References: <xzpr8v9qina.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
I forgot to attach the patch...
DES
--
Dag-Erling Smorgrav - des@ofug.org
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=module.diff
Index: sys/module.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/module.h,v
retrieving revision 1.16
diff -u -r1.16 module.h
--- sys/module.h 2001/06/19 21:40:14 1.16
+++ sys/module.h 2001/07/22 11:59:55
@@ -46,7 +46,17 @@
MOD_SHUTDOWN
} modeventtype_t;
-typedef struct module *module_t;
+typedef struct module {
+ TAILQ_ENTRY(module) link; /* chain together all modules */
+ TAILQ_ENTRY(module) flink; /* all modules in a file */
+ struct linker_file* file; /* file which contains this module */
+ int refs; /* reference count */
+ int id; /* unique id number */
+ char *name; /* module name */
+ modeventhand_t handler; /* event handler */
+ void *arg; /* argument for handler */
+ modspecific_t data; /* module specific data */
+} *module_t;
typedef int (*modeventhand_t)(module_t mod, int /*modeventtype_t*/ what,
void *arg);
Index: kern/kern_module.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_module.c,v
retrieving revision 1.26
diff -u -r1.26 kern_module.c
--- kern/kern_module.c 2001/02/04 13:12:21 1.26
+++ kern/kern_module.c 2001/07/22 11:59:37
@@ -40,17 +40,6 @@
static MALLOC_DEFINE(M_MODULE, "module", "module data structures");
typedef TAILQ_HEAD(, module) modulelist_t;
-struct module {
- TAILQ_ENTRY(module) link; /* chain together all modules */
- TAILQ_ENTRY(module) flink; /* all modules in a file */
- struct linker_file* file; /* file which contains this module */
- int refs; /* reference count */
- int id; /* unique id number */
- char *name; /* module name */
- modeventhand_t handler; /* event handler */
- void *arg; /* argument for handler */
- modspecific_t data; /* module specific data */
-};
#define MOD_EVENT(mod, type) (mod)->handler((mod), (type), (mod)->arg)
--=-=-=--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpn15xqika.fsf>
