Lines Matching refs:prod
62 static int check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument
64 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes()
68 XENSTORE_RING_IDX prod, in get_output_chunk() argument
71 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod); in get_output_chunk()
72 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk()
73 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk()
74 return buf + MASK_XENSTORE_IDX(prod); in get_output_chunk()
78 XENSTORE_RING_IDX prod, in get_input_chunk() argument
82 if ((prod - cons) < *len) in get_input_chunk()
83 *len = prod - cons; in get_input_chunk()
97 XENSTORE_RING_IDX cons, prod; in xb_write() local
113 prod = intf->req_prod; in xb_write()
114 if (!check_indexes(cons, prod)) { in xb_write()
119 dst = get_output_chunk(cons, prod, intf->req, &avail); in xb_write()
157 XENSTORE_RING_IDX cons, prod; in xb_read() local
170 prod = intf->rsp_prod; in xb_read()
171 if (!check_indexes(cons, prod)) { in xb_read()
176 src = get_input_chunk(cons, prod, intf->rsp, &avail); in xb_read()