Updated: April 19, 2023 |
Find the bus that a device belongs to
#include <drvr/hwinfo.h> unsigned hwi_find_devicebus( unsigned device_hwi_off);
The hwi_find_devicebus() function finds the bus that the device device_hwi_off resides on. This function ensures that device_hwi_off is in fact a device and that its owner is in fact a 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.
The hwinfo section offset, or HWI_NULL_OFF if the bus/device instance doesn't exist.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |