Lines Matching refs:prod
103 check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument
105 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes()
109 get_output_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, in get_output_chunk() argument
112 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod); in get_output_chunk()
113 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk()
114 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk()
115 return ((void *)(buf + MASK_XENSTORE_IDX(prod))); in get_output_chunk()
119 get_input_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, in get_input_chunk() argument
123 if ((prod - cons) < *len) in get_input_chunk()
124 *len = prod - cons; in get_input_chunk()
134 XENSTORE_RING_IDX cons, prod; in xb_write() local
157 prod = intf->req_prod; in xb_write()
159 if (!check_indexes(cons, prod)) in xb_write()
162 dst = get_output_chunk(cons, prod, (char *)intf->req, &avail); in xb_write()
188 XENSTORE_RING_IDX cons, prod; in xb_read() local
210 prod = intf->rsp_prod; in xb_read()
212 if (!check_indexes(cons, prod)) in xb_read()
215 src = get_input_chunk(cons, prod, (char *)intf->rsp, &avail); in xb_read()