hwi_find_bus()
Find the offset of the section in the system page for a bus
Synopsis:
#include <drvr/hwinfo.h>
unsigned hwi_find_bus( const char *bus_name,
unsigned unit );
Arguments:
- bus_name
- The name of the bus.
- unit
- The unit number.
Library:
libdrvr
Use the -l drvr option to qcc to link against this library.
Description:
If the unit instance of bus_name has been added to the hwinfo section of the syspage, hwi_find_bus() returns its offset. This function ensures that the bus_name found is in fact a bus.
This function is basically a wrapper for hwi_find_item() that allows for a specific item instance to be returned. It differs from hwi_find_item() in that it resolves (all) synonym names (aliases) to a real bus.
Note that although we used the name bus
to be consistent with previous
nomenclature, from a topology perscpective, we actually mean any interconnect
to which a device is connected.
Returns:
The hwinfo section offset, or HWI_NULL_OFF if the device instance doesn't exist.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | No |
Thread | Yes |