Lines Matching refs:tail
63 * We use head and tail indices that aren't masked off, except at the point of
224 unsigned int tail = READ_ONCE(pipe->tail);
227 return !pipe_empty(head, tail) || !writers;
254 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
258 unsigned int tail = pipe->tail;
285 if (!pipe_empty(head, tail)) {
286 struct pipe_buffer *buf = &pipe->bufs[tail & mask];
330 tail++;
331 pipe->tail = tail;
337 if (!pipe_empty(head, tail)) /* More to do? */
383 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
386 if (pipe_empty(pipe->head, pipe->tail))
409 unsigned int tail = READ_ONCE(pipe->tail);
412 return !pipe_full(head, tail, max_usage) ||
454 was_empty = pipe_empty(head, pipe->tail);
488 if (!pipe_full(head, pipe->tail, pipe->max_usage)) {
511 if (pipe_full(head, pipe->tail, pipe->max_usage)) {
544 if (!pipe_full(head, pipe->tail, pipe->max_usage))
572 was_empty = pipe_empty(pipe->head, pipe->tail);
576 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage))
609 unsigned int count, head, tail, mask;
616 tail = pipe->tail;
619 while (tail != head) {
620 count += pipe->bufs[tail & mask].len;
621 tail++;
652 unsigned int head, tail;
674 tail = READ_ONCE(pipe->tail);
678 if (!pipe_empty(head, tail))
685 if (!pipe_full(head, tail, pipe->max_usage))
1258 unsigned int head, tail, mask, n;
1268 tail = pipe->tail;
1270 n = pipe_occupancy(head, tail);
1283 unsigned int t = tail & mask;
1298 tail = 0;
1305 pipe->tail = tail;