Subject: Re: ifnet specific data
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-net
Date: 09/18/2006 18:56:29
--qjNfmADvan18RZcF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 19, 2006 at 07:34:32AM +0900, YAMAMOTO Takashi wrote:
> > Yes & no. What we could do is have the dictionary and have shadow=20
> > variables. Change the dict, and the shadow variables change too. Think =
of=20
> > these variables as caching the result of key lookups. While we can't lo=
ok=20
> > in the dictionary in interrupt context, if we do it right, we _can_ loo=
k=20
> > at the shadow variables. Put another way, as long as we don't do it wro=
ng,=20
> > we can read the shadow variables.
> >=20
> > This does mean we need to know when the dictionary changes (as long as =
the=20
> > driver gets called, not hard). Also, it means that the dictionary can't=
=20
> > contain state that needs gathering at interrupt context. Though I doubt=
=20
> > anyone would use a properties dictionary for that. :-)
>=20
> what's the point to have a dictionary at all in addition to the
> "shadow variables"?

I'm assuming that not everything in the dictionary needs a shadow=20
variable. If that's wrong (i.e. everything needs a shadow variable),=20
there's no point.

I also expect that we will be adding more-general device driver uses for=20
a dictionary. So we will have both "non-shadow-variable" uses for a dict,=
=20
and we will need to figure out how to handle this eventually.

Take care,

Bill

--qjNfmADvan18RZcF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFFD05MWz+3JHUci9cRAuvGAJ9J/41WjD6TyCXMQOx/UHNGm2u5CwCcCBll
9OLe/UQ5ta46yjpAef70/A8=
=He+Z
-----END PGP SIGNATURE-----

--qjNfmADvan18RZcF--