FreeBSD/sys/kern/subr_bus.c
/**
 * @internal
 * @brief Register the pass level of a new driver attachment
 *
 * Register a new driver attachment's pass level.  If no driver
 * attachment with the same pass level has been added, then @p new
 * will be added to the global passes list.
 *
 * @param new		the new driver attachment
 */
@internal
@brief Register the pass level of a new driver attachment

Register a new driver attachment's pass level.  If no driver
attachment with the same pass level has been added, then @p new
will be added to the global passes list.

@param new           the new driver attachment
@internal @brief Register the pass level of a new driver attachment Register a new driver attachment ' s pass level . If no driver attachment with the same pass level has been added then @p new will be added to the global passes list . @param new the new driver attachment
static void
driver_register_pass(struct driverlink *new)
{
	struct driverlink *dl;
	if (bus_current_pass == BUS_PASS_DEFAULT)
		return;
	TAILQ_FOREACH(dl, &passes, passlink) {
		if (dl->pass < new->pass)
			continue;
		if (dl->pass == new->pass)
			return;
		TAILQ_INSERT_BEFORE(dl, new, passlink);
		return;
	}
	TAILQ_INSERT_TAIL(&passes, new, passlink);
}
static void driver_register_pass ( struct driverlink * new ) { struct driverlink * dl ; if ( bus_current_pass == BUS_PASS_DEFAULT ) return ; TAILQ_FOREACH ( dl , & passes , passlink ) { if ( dl -> pass < new -> pass ) continue ; if ( dl -> pass == new -> pass ) return ; TAILQ_INSERT_BEFORE ( dl , new , passlink ) ; return ; } TAILQ_INSERT_TAIL ( & passes , new , passlink ) ; }
@internal
 @brief Register the pass level of a new driver attachment
@internal @brief Register the pass level of a new driver attachment
/* We only consider pass numbers during boot. */ /*
	 * Walk the passes list.  If we already know about this pass
	 * then there is nothing to do.  If we don't, then insert this
	 * driver link into the list.
	 */