Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Dec 2001 12:45:24 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Dave Rufino <dr263@hermes.cam.ac.uk>, Alfred Perlstein <bright@mu.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: statefulness in character device drivers 
Message-ID:  <200112082045.fB8KjOT01294@mass.dis.org>
In-Reply-To: Your message of "Sat, 08 Dec 2001 11:51:32 %2B0100." <47779.1007808692@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >> >Sorry, unbelievably bad at explaining myself. Per-open data is what i
> >> >meant. The reason I'm interested is it would make a full nvidia driver
> >> >port quite a bit easier.
> >> 
> >> Sorry, I know of no current plans which adress this.
> >> 
> >> The issue is non-trivial to fix because we currently don't pass
> >> dup(2) events through the vnode layer.
> >
> >Are you sure this is even necessary?
> >
> >They are talking about "per-open", not "per-fd-instance" data,
> >which could easily exclude dup, dup2, and fcntl(f_DUPFD).
> 
> If you don't include dup/dup2/fnctl in your accounting, you
> can only reliably tell "first open", "another open", "some close"
> and "final close".  You an modulate this with the pid, but you
> still have no idea what is going on in any amount of detail.

For this class of problems, you don't care.  Inheritance is fine; what 
you're almost doing is cloning within the driver; on each open you cons a 
new sub-softc and attach it to the open instance.

I think this is quite desirable.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



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




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