FreeBSD/sys/kern/subr_bus.c
/**
 * @brief Increment the busy counter for the device
 */
@brief Increment the busy counter for the device
@brief Increment the busy counter for the device
void
device_busy(device_t dev)
{
	if (dev->state < DS_ATTACHING)
		panic("device_busy: called for unattached device");
	if (dev->busy == 0 && dev->parent)
		device_busy(dev->parent);
	dev->busy++;
	if (dev->state == DS_ATTACHED)
		dev->state = DS_BUSY;
}
void device_busy ( device_t dev ) { if ( dev -> state < DS_ATTACHING ) panic ( " " ) ; if ( dev -> busy == 0 && dev -> parent ) device_busy ( dev -> parent ) ; dev -> busy ++ ; if ( dev -> state == DS_ATTACHED ) dev -> state = DS_BUSY ; }
@brief Increment the busy counter for the device
@brief Increment the busy counter for the device