From owner-freebsd-current Fri Jan 12 15:28:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 2B9D037B400; Fri, 12 Jan 2001 15:28:35 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id SAA16979; Fri, 12 Jan 2001 18:28:34 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.1/8.9.1) id f0CNSYH05299; Fri, 12 Jan 2001 18:28:34 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 12 Jan 2001 18:28:34 -0500 (EST) To: Julian Elischer Cc: phk@freebsd.org, freebsd-current@freebsd.org Subject: Re: Running Linux kernel modules. In-Reply-To: <3A5F16D8.2E1B471C@elischer.org> References: <01C07BF3.695D3780.ggross@symark.com> <14942.32188.899333.434988@grasshopper.cs.duke.edu> <3A5F16D8.2E1B471C@elischer.org> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14943.37198.480690.136547@grasshopper.cs.duke.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Julian Elischer writes: > > > > Isn't this gross? Is there a better way? > > I think that the better way is to actually have each open have a > different minor number. > i.e. each process opens a different copy. > The way to achieve this best is with cloning devices. > apply within phk for more info :-) Does this mean that the processes can open /dev/foo0 twice and the driver sees a different minor number for each open? Or does it mean that the process has to open /dev/foo0 and /dev/foo1? If the former, that's awesome!... How do I use it? If the latter, then it isn't practical for things like vmware and my Giganet VI driver because both depend on closed-source userland code which cannot be taught to open differently named special files. > I could imagine however that you could assume that each process > opens the device only once, and thus have a hash-table of > private info, keyed on curproc. You should be able to store the curproc > key with the request currently being serviced so that teh interrupt routines > can also use the same key. It would simplifly things, but I don't think that this is going to be a valid assumption in general.. Thanks! Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message