Skip site navigation (1)Skip section navigation (2)
Date:      22 Jul 2001 14:16:49 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        arch@FreeBSD.ORG
Subject:   Re: moving struct module out of kern_module.c
Message-ID:  <xzpitglqhu6.fsf@flood.ping.uio.no>
In-Reply-To: <xzpn15xqika.fsf@flood.ping.uio.no>
References:  <xzpr8v9qina.fsf@flood.ping.uio.no> <xzpn15xqika.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Dag-Erling Smorgrav <des@ofug.org> writes:
> I forgot to attach the patch...

And of course it doesn't build, because the ordering is wrong.  I've
attached a corrected 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 12:14:14
@@ -46,7 +46,7 @@
     MOD_SHUTDOWN
 } modeventtype_t;
 
-typedef	struct module *module_t;
+typedef struct module *module_t;
 
 typedef	int (*modeventhand_t)(module_t mod, int /*modeventtype_t*/ what,
 			      void *arg);
@@ -92,6 +92,18 @@
     int		md_type;		/* type of entry MDT_* */
     void 	*md_data;		/* specific data */
     const char	*md_cval;		/* common string label */
+};
+
+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 */
 };
 
 #ifdef _KERNEL
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?xzpitglqhu6.fsf>