Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Dec 2001 20:43:01 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.ORG>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Dave Rufino <dr263@hermes.cam.ac.uk>, Terry Lambert <tlambert2@mindspring.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: statefulness in character device drivers
Message-ID:  <Pine.NEB.3.96L.1011208204110.57264U-100000@fledge.watson.org>
In-Reply-To: <20011208054108.C92148@elvis.mu.org>

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

On Sat, 8 Dec 2001, Alfred Perlstein wrote:

> Yes, but afaik without a way to differenciate between two opens.  Being
> able to notice whether a file is being operated on via which open is the
> important part. 
> 
> This would probably involve changing VOP_OPENs to pass a void ** that
> would be stored in the struct file that would be passed to subsequent
> ioctl/read/write/close operations. 

I had some patches to do this, but lost them ages ago.  If I get really
bored next week, I'll redo them and stick them in a perforce branch.  That
said, it requires a bit more work, but is easier if you define the void**
as optional: if it's non-NULL, then you return state, and let it get
passed back in.  Otherwise, you assume it's traditional stateless access.
It requires some tweaking of the vnode pager, among other things, but is
actually a relatively straight-forward patch.  Maybe I'll give it a spin
again and post patches to -arch or something.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services



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?Pine.NEB.3.96L.1011208204110.57264U-100000>