Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2001 18:28:34 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Julian Elischer <julian@elischer.org>
Cc:        phk@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: Running Linux kernel modules.
Message-ID:  <14943.37198.480690.136547@grasshopper.cs.duke.edu>
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>

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

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14943.37198.480690.136547>