Lines Matching refs:tail
62 * We use head and tail indices that aren't masked off, except at the point of
223 unsigned int tail = READ_ONCE(pipe->tail);
226 return !pipe_empty(head, tail) || !writers;
253 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
257 unsigned int tail = pipe->tail;
284 if (!pipe_empty(head, tail)) {
285 struct pipe_buffer *buf = &pipe->bufs[tail & mask];
329 tail++;
330 pipe->tail = tail;
336 if (!pipe_empty(head, tail)) /* More to do? */
381 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
384 if (pipe_empty(pipe->head, pipe->tail))
407 unsigned int tail = READ_ONCE(pipe->tail);
410 return !pipe_full(head, tail, max_usage) ||
452 was_empty = pipe_empty(head, pipe->tail);
486 if (!pipe_full(head, pipe->tail, pipe->max_usage)) {
509 if (pipe_full(head, pipe->tail, pipe->max_usage)) {
543 if (!pipe_full(head, pipe->tail, pipe->max_usage))
570 was_empty = pipe_empty(pipe->head, pipe->tail);
574 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage))
607 int count, head, tail, mask;
614 tail = pipe->tail;
617 while (tail != head) {
618 count += pipe->bufs[tail & mask].len;
619 tail++;
650 unsigned int head, tail;
672 tail = READ_ONCE(pipe->tail);
676 if (!pipe_empty(head, tail))
683 if (!pipe_full(head, tail, pipe->max_usage))
1253 unsigned int head, tail, mask, n;
1263 tail = pipe->tail;
1265 n = pipe_occupancy(head, tail);
1278 unsigned int t = tail & mask;
1293 tail = 0;
1300 pipe->tail = tail;