FreeBSD/sys/xen/xenbus/xenbusb_back.c
/**
 * \brief Attach the XenBus back bus.
 *
 * \param dev  NewBus device_t for this XenBus back bus instance.
 *
 * \return  On success, 0. Otherwise an errno value indicating the
 *          type of failure.
 */
\brief Attach the XenBus back bus.
\param dev  NewBus device_t for this XenBus back bus instance.

\return  On success, 0. Otherwise an errno value indicating the
type of failure.
\ brief Attach the XenBus back bus . \ param dev NewBus device_t for this XenBus back bus instance . \ return On success 0 . Otherwise an errno value indicating the type of failure .
static int
xenbusb_back_attach(device_t dev)
{
	struct xenbusb_softc *xbs;
	int error;
	xbs = device_get_softc(dev);
	error = xenbusb_attach(dev, "backend", 2);
	mtx_lock(&xbs->xbs_lock);
	if ((xbs->xbs_flags & XBS_ATTACH_CH_ACTIVE) != 0) {
		xbs->xbs_flags &= ~XBS_ATTACH_CH_ACTIVE;
		mtx_unlock(&xbs->xbs_lock);
		config_intrhook_disestablish(&xbs->xbs_attach_ch);
	} else {
		mtx_unlock(&xbs->xbs_lock);
	}
	return (error);
}
static int xenbusb_back_attach ( device_t dev ) { struct xenbusb_softc * xbs ; int error ; xbs = device_get_softc ( dev ) ; error = xenbusb_attach ( dev , " " , 2 ) ; mtx_lock ( & xbs -> xbs_lock ) ; if ( ( xbs -> xbs_flags & XBS_ATTACH_CH_ACTIVE ) != 0 ) { xbs -> xbs_flags &= ~ XBS_ATTACH_CH_ACTIVE ; mtx_unlock ( & xbs -> xbs_lock ) ; config_intrhook_disestablish ( & xbs -> xbs_attach_ch ) ; } else { mtx_unlock ( & xbs -> xbs_lock ) ; } return ( error ) ; }
\brief Attach the XenBus back bus.
\ brief Attach the XenBus back bus .
/*id_components*/ /*
	 * Backend devices operate to serve other domains,
	 * so there is no need to hold up boot processing
	 * while connections to foreign domains are made.
	 */