Lines Matching refs:ring_size
362 static inline RING_IDX name##_mask(RING_IDX idx, RING_IDX ring_size) \
364 return idx & (ring_size - 1); \
369 RING_IDX ring_size) \
371 return buf + name##_mask(idx, ring_size); \
379 RING_IDX ring_size) \
382 size <= ring_size - *masked_cons) { \
385 memcpy(opaque, buf + *masked_cons, ring_size - *masked_cons); \
386 memcpy((unsigned char *)opaque + ring_size - *masked_cons, buf, \
387 size - (ring_size - *masked_cons)); \
389 *masked_cons = name##_mask(*masked_cons + size, ring_size); \
397 RING_IDX ring_size) \
400 size <= ring_size - *masked_prod) { \
403 memcpy(buf + *masked_prod, opaque, ring_size - *masked_prod); \
404 memcpy(buf, (unsigned char *)opaque + (ring_size - *masked_prod), \
405 size - (ring_size - *masked_prod)); \
407 *masked_prod = name##_mask(*masked_prod + size, ring_size); \
412 RING_IDX ring_size) \
419 prod = name##_mask(prod, ring_size); \
420 cons = name##_mask(cons, ring_size); \
423 return ring_size; \
428 size = ring_size - (cons - prod); \