Lines Matching refs:cons
373 * \param cons The consumer index for the ring to test.
380 xs_check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod)
383 return ((prod - cons) <= XENSTORE_RING_SIZE);
390 * \param cons The consumer index for the ring.
398 xs_get_output_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod,
403 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len)
404 *len = XENSTORE_RING_SIZE - (prod - cons);
412 * \param cons The consumer index for the ring.
420 xs_get_input_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod,
424 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons);
425 if ((prod - cons) < *len)
426 *len = prod - cons;
427 return (buf + MASK_XENSTORE_IDX(cons));
447 XENSTORE_RING_IDX cons, prod;
458 cons = xen_store->req_cons;
460 if ((prod - cons) == XENSTORE_RING_SIZE) {
484 if (!xs_check_indexes(cons, prod)) {
489 dst = xs_get_output_chunk(cons, prod, xen_store->req, &avail);
536 XENSTORE_RING_IDX cons, prod;
546 cons = xen_store->rsp_cons;
548 if (cons == prod) {
570 if (!xs_check_indexes(cons, prod)) {
575 src = xs_get_input_chunk(cons, prod, xen_store->rsp, &avail);