FreeBSD/sys/cam/cam_xpt.c
/*
 * Get a CAM control block for the caller. Charge the structure to the device
 * referenced by the path.  If we don't have sufficient resources to allocate
 * more ccbs, we return NULL.
 */
Get a CAM control block for the caller. Charge the structure to the device
referenced by the path.  If we don't have sufficient resources to allocate
more ccbs, we return NULL.
Get a CAM control block for the caller . Charge the structure to the device referenced by the path . If we don ' t have sufficient resources to allocate more ccbs we return NULL .
static union ccb *
xpt_get_ccb_nowait(struct cam_periph *periph)
{
	union ccb *new_ccb;
	new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_NOWAIT);
	if (new_ccb == NULL)
		return (NULL);
	periph->periph_allocated++;
	cam_ccbq_take_opening(&periph->path->device->ccbq);
	return (new_ccb);
}
static union ccb * xpt_get_ccb_nowait ( struct cam_periph * periph ) { union ccb * new_ccb ; new_ccb = malloc ( sizeof ( * new_ccb ) , M_CAMCCB , M_ZERO | M_NOWAIT ) ; if ( new_ccb == NULL ) return ( NULL ) ; periph -> periph_allocated ++ ; cam_ccbq_take_opening ( & periph -> path -> device -> ccbq ) ; return ( new_ccb ) ; }
Get a CAM control block for the caller.
Get a CAM control block for the caller .