Lines Matching refs:consume
90 #define ring_empty(d) (((d)->consume == (d)->supply) && \
92 #define ring_full(d) (((d)->supply == (d)->consume) && \
108 ring->supply = ring->consume = ring->bottom = buffer; in ring_init()
136 if (ring->mark == ring->consume) { in ring_at_mark()
173 (ring_subtract(ring, ring->mark, ring->consume) < count)) { in ring_consumed()
177 if (ring->consume < ring->clearto && in ring_consumed()
178 ring->clearto <= ring->consume + count) in ring_consumed()
180 else if (ring->consume + count > ring->top && in ring_consumed()
184 ring->consume = ring_increment(ring, ring->consume, count); in ring_consumed()
190 ring->consume = ring->supply = ring->bottom; in ring_consumed()
206 return (ring_subtract(ring, ring->consume, ring->supply)); in ring_empty_count()
214 if ((ring->consume < ring->supply) || ring_empty(ring)) { in ring_empty_consecutive()
224 return (ring_subtract(ring, ring->consume, ring->supply)); in ring_empty_consecutive()
236 if ((ring->mark == 0) || (ring->mark == ring->consume)) { in ring_full_count()
241 ring->consume)); in ring_full_count()
244 return (ring_subtract(ring, ring->mark, ring->consume)); in ring_full_count()
255 if ((ring->mark == 0) || (ring->mark == ring->consume)) { in ring_full_consecutive()
256 if ((ring->supply < ring->consume) || ring_full(ring)) { in ring_full_consecutive()
257 return (ring_subtract(ring, ring->top, ring->consume)); in ring_full_consecutive()
260 ring->consume)); in ring_full_consecutive()
263 if (ring->mark < ring->consume) { in ring_full_consecutive()
264 return (ring_subtract(ring, ring->top, ring->consume)); in ring_full_consecutive()
266 return (ring_subtract(ring, ring->mark, ring->consume)); in ring_full_consecutive()
300 memcpy(buffer, ring->consume, i); in ring_consume_data()
317 c = ring->consume; in ring_encrypt()