Where is BUS_ALLOC_RESOURCE defined!

Hi all,

Been grep'n source, searching the web, created a ctags of the complete src tree, yet I still cannot find the definition of the macro BUS_ALLOC_RESOURCE.

Where is it please ?

Thanks

One would think the source file name would be indicated in the functions man page!

-Enjoy
fh : )_~
 
First place I looked.

This is what I'm looking for (highlighted in red):
From: kern/subr_bus.c
Code:
/**
 * @brief Wrapper function for BUS_ALLOC_RESOURCE().
 *
 * This function simply calls the BUS_ALLOC_RESOURCE() method of the
 * parent of @p dev.
 */
struct resource *
bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end,
    u_long count, u_int flags)
{
	if (dev->parent == NULL)
		return (NULL);
	return ([color="Red"]BUS_ALLOC_RESOURCE[/color](dev->parent, dev, type, rid, start, end,
	    count, flags));
}

Thanks

-Enjoy
fh : )_~
 
/usr/obj/usr/src/sys/YOUR_KERNCONF_NAME/bus_if.h

The file is generated at compile time. You need to compile kernel otherwise there isn't such dir.

awk(1) (uses a script file make???.awk I don't remember) reads corresponding *.m files in /usr/src/sys/kern/, in this case reads /usr/src/sys/kern/bus_if.m and makes the file.
 
PseudoCylon said:
/usr/obj/usr/src/sys/YOUR_KERNCONF_NAME/bus_if.h

The file is generated at compile time. You need to compile kernel otherwise there isn't such dir.

awk(1) (uses a script file make???.awk I don't remember) reads corresponding *.m files in /usr/src/sys/kern/, in this case reads /usr/src/sys/kern/bus_if.m and makes the file.

Much Thanks!

I was reading over the Kobj last night and figured this out, what an amazing obfuscation!

-Enjoy
fh : )_~
 
Back
Top