Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2010 13:01:00 +0930
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Christopher Bowman <freebsd-hackers@chrisbowman.com>
Cc:        hackers@freebsd.org
Subject:   Re: Missing files device_if.h and bus_if.h
Message-ID:  <F20352B3-C00C-4A8B-8237-90B2F8F28A26@gsoft.com.au>
In-Reply-To: <AANLkTilpET2OC_tqQOrV6wMUxqIwGBwvGwf1RngjNjJI@mail.gmail.com>
References:  <AANLkTilpET2OC_tqQOrV6wMUxqIwGBwvGwf1RngjNjJI@mail.gmail.com>

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

On 11/07/2010, at 10:57, Christopher Bowman wrote:
> #include "device_if.h"
> #include "bus_if.h"
>=20
> however, I don't see them any where in my source tree.  Are these
> missing or am I suppose to create them or are they built as part of
> the build process and if the latter then why didn't I get a copy when
> I built a custom kernel?
>=20
> Where do I get these files?  Could someone please clue me in here?

They are part of the newbus infrastructure and are generated on the fly.

An awk script (makeobjops.awk) generates them from the corresponding .m =
file in src/sys/kern.

> And since I am asking questions here, I see BUS_READ_IVAR used a
> couple of places but can't find it's definition.  Where is it defined?

It is defined in (the generated) bus_if.h ->
static __inline int BUS_READ_IVAR(device_t _dev, device_t _child, int =
_index,
                                  uintptr_t *_result)
{
        kobjop_t _m;
        KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_read_ivar);
        return ((bus_read_ivar_t *) _m)(_dev, _child, _index, _result);
}

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F20352B3-C00C-4A8B-8237-90B2F8F28A26>