From owner-freebsd-hackers Mon Aug 25 23:06:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA11895 for hackers-outgoing; Mon, 25 Aug 1997 23:06:05 -0700 (PDT) Received: from george.lbl.gov (george-2.lbl.gov [131.243.2.12]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id XAA11890 for ; Mon, 25 Aug 1997 23:06:02 -0700 (PDT) Received: from localhost (peb@localhost) by george.lbl.gov (8.6.10/8.6.5) with SMTP id XAA04418; Mon, 25 Aug 1997 23:02:42 -0700 Date: Mon, 25 Aug 1997 23:02:42 -0700 (PDT) From: Pat Bozeman Reply-To: PBozeman@lbl.gov To: Terry Lambert cc: freebsd-hackers@FreeBSD.ORG Subject: Re: lkm.h MOD_DEV & DISPATCH In-Reply-To: <199708260311.UAA02640@phaeton.artisoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 25 Aug 1997, Terry Lambert wrote: > > Why does MOD_DEV concatinate the name of the device with _module when > > none of the other module types do? This leads to a conflict with DISPATCH > > which does not expect the name to be concatinated to _module. > > To avoid namespace conflicts in drivers which export multiple module > types. Having a static value only saves you from inter-module > conflicts. The intra-module conflicts can still byte you. So, does one just not use DISPATCH with MOD_DEV? Not that this is a big deal, but coding your own version of the module entry point ala DISPTACH requires that you know how MOD_DEV creates the name of module structure which results in code which may not be portable between versions of lkm.h How about some using a macro in MOD_DEV to build the name that a module writter can also use to access the static structure created in MOD_DEV. -- Patrick Bozeman PBozeman@lbl.gov