Lines Matching defs:cons
380 * \param cons The consumer index for the ring to test.
387 xs_check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod)
390 return ((prod - cons) <= XENSTORE_RING_SIZE);
397 * \param cons The consumer index for the ring.
405 xs_get_output_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod,
410 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len)
411 *len = XENSTORE_RING_SIZE - (prod - cons);
419 * \param cons The consumer index for the ring.
427 xs_get_input_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod,
431 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons);
432 if ((prod - cons) < *len)
433 *len = prod - cons;
434 return (buf + MASK_XENSTORE_IDX(cons));
454 XENSTORE_RING_IDX cons, prod;
465 cons = xen_store->req_cons;
467 if ((prod - cons) == XENSTORE_RING_SIZE) {
491 if (!xs_check_indexes(cons, prod)) {
496 dst = xs_get_output_chunk(cons, prod, xen_store->req, &avail);
543 XENSTORE_RING_IDX cons, prod;
553 cons = xen_store->rsp_cons;
555 if (cons == prod) {
577 if (!xs_check_indexes(cons, prod)) {
582 src = xs_get_input_chunk(cons, prod, xen_store->rsp, &avail);