Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Aug 1999 14:13:09 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Brian Somers <brian@Awfulhak.org>, Dag-Erling Smorgrav <des@flood.ping.uio.no>, Julian Elischer <julian@whistle.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys conf.h 
Message-ID:  <199908161313.OAA77853@keep.lan.Awfulhak.org>
In-Reply-To: Your message of "Mon, 16 Aug 1999 14:15:30 %2B0200." <19048.934805730@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> In message <199908161045.LAA76741@keep.lan.Awfulhak.org>, Brian Somers writes:
> >> Brian Somers <brian@Awfulhak.org> writes:
> >> > From what I can tell, this requires that the driver ignores the minor 
> >> > number ('cos it's the same for all accesses) but keeps a track of of 
> >> > the process id in the device structure.  The driver would need to 
> >> > know about fork()s and *all* close()s, and would probably need to 
> >> > use something faster than `sequential' to find the device structure 
> >> > from the pid (some sort of hash).
> >> 
> >> What if the same process needs several instances of the same device?
> >
> >Yes - it would need to know about dup*() too and would have to store 
> >an instance number as well as the processid.  It's definitely 
> >non-trivial.
> 
> You guys lost me here... What are we discussing now ?

Just chewing the cud about being able to open /dev/XXX and get a 
unique allocated-on-the-fly instance of the device.

Thinking about things more.... maybe the driver just has to figure 
out the global descriptor table offset involved and use that to 
figure out what device structure is required.

> --
> Poul-Henning Kamp             FreeBSD coreteam member
> phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
> FreeBSD -- It will take a long time before progress goes too far!
> 

-- 
Brian <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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