FreeBSD/sys/dev/xen/blkback/blkback.c
/*---------------------------- Request Processing ----------------------------*/
/**
 * Allocate an internal transaction tracking structure from the free pool.
 *
 * \param xbb  Per-instance xbb configuration structure.
 *
 * \return  On success, a pointer to the allocated xbb_xen_req structure.
 *          Otherwise NULL.
 */
Request Processing
Allocate an internal transaction tracking structure from the free pool.

\param xbb  Per-instance xbb configuration structure.

\return  On success, a pointer to the allocated xbb_xen_req structure.
Otherwise NULL.
Request Processing Allocate an internal transaction tracking structure from the free pool . \ param xbb Per - instance xbb configuration structure . \ return On success a pointer to the allocated xbb_xen_req structure . Otherwise NULL .
static inline struct xbb_xen_req *
xbb_get_req(struct xbb_softc *xbb)
{
	struct xbb_xen_req *req;
	req = NULL;
	mtx_assert(&xbb->lock, MA_OWNED);
	if ((req = STAILQ_FIRST(&xbb->request_free_stailq)) != NULL) {
		STAILQ_REMOVE_HEAD(&xbb->request_free_stailq, links);
		xbb->active_request_count++;
	}
	return (req);
}
static inline struct xbb_xen_req * xbb_get_req ( struct xbb_softc * xbb ) { struct xbb_xen_req * req ; req = NULL ; mtx_assert ( & xbb -> lock , MA_OWNED ) ; if ( ( req = STAILQ_FIRST ( & xbb -> request_free_stailq ) ) != NULL ) { STAILQ_REMOVE_HEAD ( & xbb -> request_free_stailq , links ) ; xbb -> active_request_count ++ ; } return ( req ) ; }
Request Processing
 Allocate an internal transaction tracking structure from the free pool.
Request Processing Allocate an internal transaction tracking structure from the free pool .