Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2001 16:15:37 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        Julian Elischer <julian@elischer.org>, phk@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: Running Linux kernel modules.
Message-ID:  <20010112161535.B7240@fw.wintelcom.net>
In-Reply-To: <14943.37198.480690.136547@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Fri, Jan 12, 2001 at 06:28:34PM -0500
References:  <01C07BF3.695D3780.ggross@symark.com> <14942.32188.899333.434988@grasshopper.cs.duke.edu> <3A5F16D8.2E1B471C@elischer.org> <14943.37198.480690.136547@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
* Andrew Gallatin <gallatin@cs.duke.edu> [010112 15:29] wrote:
> 
> 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?

Well you have to write it, but you basically have the open(2)
syscall path optionally return a seperate void * 'cookie' that you
must pass into all operations (fileops) on that file.

It's not a major rewrite of any code, you just need an extra
parameter per fileop and store it in the struct file.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


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?20010112161535.B7240>