FreeBSD/sys/dev/xen/blkback/blkback.c
/**
 * Send queued responses to blkif requests.
 * 
 * \param xbb            Per-instance xbb configuration structure.
 * \param run_taskqueue  Flag that is set to 1 if the taskqueue
 *			 should be run, 0 if it does not need to be run.
 * \param notify	 Flag that is set to 1 if the other end should be
 * 			 notified via irq, 0 if the other end should not be
 *			 notified.
 */
Send queued responses to blkif requests.

\param xbb            Per-instance xbb configuration structure.
\param run_taskqueue  Flag that is set to 1 if the taskqueue
should be run, 0 if it does not need to be run.
\param notify         Flag that is set to 1 if the other end should be
notified via irq, 0 if the other end should not be
notified.
Send queued responses to blkif requests . \ param xbb Per - instance xbb configuration structure . \ param run_taskqueue Flag that is set to 1 if the taskqueue should be run 0 if it does not need to be run . \ param notify Flag that is set to 1 if the other end should be notified via irq 0 if the other end should not be notified .
static void
xbb_push_responses(struct xbb_softc *xbb, int *run_taskqueue, int *notify)
{
	int more_to_do;
	mtx_assert(&xbb->lock, MA_OWNED);
	more_to_do = 0;
	RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&xbb->rings.common, *notify);
	if (xbb->rings.common.rsp_prod_pvt == xbb->rings.common.req_cons) {
		RING_FINAL_CHECK_FOR_REQUESTS(&xbb->rings.common, more_to_do);
	} else if (RING_HAS_UNCONSUMED_REQUESTS(&xbb->rings.common)) {
		more_to_do = 1;
	}
	xbb->reqs_completed += xbb->reqs_queued_for_completion;
	xbb->reqs_queued_for_completion = 0;
	*run_taskqueue = more_to_do;
}
static void xbb_push_responses ( struct xbb_softc * xbb , int * run_taskqueue , int * notify ) { int more_to_do ; mtx_assert ( & xbb -> lock , MA_OWNED ) ; more_to_do = 0 ; RING_PUSH_RESPONSES_AND_CHECK_NOTIFY ( & xbb -> rings . common , * notify ) ; if ( xbb -> rings . common . rsp_prod_pvt == xbb -> rings . common . req_cons ) { RING_FINAL_CHECK_FOR_REQUESTS ( & xbb -> rings . common , more_to_do ) ; } else if ( RING_HAS_UNCONSUMED_REQUESTS ( & xbb -> rings . common ) ) { more_to_do = 1 ; } xbb -> reqs_completed += xbb -> reqs_queued_for_completion ; xbb -> reqs_queued_for_completion = 0 ; * run_taskqueue = more_to_do ; }
Send queued responses to blkif requests.
Send queued responses to blkif requests .
/*
	 * The mutex is required here.
	 */ /*
		 * Tail check for pending requests. Allows frontend to avoid
		 * notifications if requests are already in flight (lower
		 * overheads and promotes batching).
		 */