XENSTORE_RING_SIZE
if (intf->rsp_prod - cons >= XENSTORE_RING_SIZE)
return ((prod - cons) <= XENSTORE_RING_SIZE);
*len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod);
if ((XENSTORE_RING_SIZE - (prod - cons)) < *len)
*len = XENSTORE_RING_SIZE - (prod - cons);
*len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons);
return (intf->req_prod - intf->req_cons) != XENSTORE_RING_SIZE &&
#define MASK_XENSTORE_IDX(idx) ((idx) & (XENSTORE_RING_SIZE-1))
char req[XENSTORE_RING_SIZE]; /* Requests to xenstore daemon. */
char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */