From owner-freebsd-arch Sun Jul 22 5: 1:20 2001 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 5DC9837B406 for ; Sun, 22 Jul 2001 05:01:11 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id OAA25009; Sun, 22 Jul 2001 14:01:10 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: arch@FreeBSD.ORG Subject: Re: moving struct module out of kern_module.c References: From: Dag-Erling Smorgrav Date: 22 Jul 2001 14:01:09 +0200 In-Reply-To: Message-ID: Lines: 8 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= 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