Lines Matching refs:cons
386 xs_check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in xs_check_indexes() argument
389 return ((prod - cons) <= XENSTORE_RING_SIZE); in xs_check_indexes()
404 xs_get_output_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, in xs_get_output_chunk() argument
409 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in xs_get_output_chunk()
410 *len = XENSTORE_RING_SIZE - (prod - cons); in xs_get_output_chunk()
426 xs_get_input_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, in xs_get_input_chunk() argument
430 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in xs_get_input_chunk()
431 if ((prod - cons) < *len) in xs_get_input_chunk()
432 *len = prod - cons; in xs_get_input_chunk()
433 return (buf + MASK_XENSTORE_IDX(cons)); in xs_get_input_chunk()
453 XENSTORE_RING_IDX cons, prod; in xs_write_store() local
464 cons = xen_store->req_cons; in xs_write_store()
466 if ((prod - cons) == XENSTORE_RING_SIZE) { in xs_write_store()
490 if (!xs_check_indexes(cons, prod)) { in xs_write_store()
495 dst = xs_get_output_chunk(cons, prod, xen_store->req, &avail); in xs_write_store()
542 XENSTORE_RING_IDX cons, prod; in xs_read_store() local
552 cons = xen_store->rsp_cons; in xs_read_store()
554 if (cons == prod) { in xs_read_store()
576 if (!xs_check_indexes(cons, prod)) { in xs_read_store()
581 src = xs_get_input_chunk(cons, prod, xen_store->rsp, &avail); in xs_read_store()