Missing files device_if.h and bus_if.h

Daniel O'Connor doconnor at gsoft.com.au
Sun Jul 11 03:58:36 UTC 2010


On 11/07/2010, at 10:57, Christopher Bowman wrote:
> #include "device_if.h"
> #include "bus_if.h"
> 
> 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?
> 
> 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








More information about the freebsd-hackers mailing list