Lines Matching refs:tail
214 unsigned int tail = READ_ONCE(pipe->tail); in pipe_readable() local
217 return !pipe_empty(head, tail) || !writers; in pipe_readable()
222 unsigned int tail) in pipe_update_tail() argument
237 pipe->tail = ++tail; in pipe_update_tail()
239 return tail; in pipe_update_tail()
246 pipe->tail = ++tail; in pipe_update_tail()
247 return tail; in pipe_update_tail()
274 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
278 unsigned int tail = pipe->tail; in pipe_read() local
305 if (!pipe_empty(head, tail)) { in pipe_read()
306 struct pipe_buffer *buf = &pipe->bufs[tail & mask]; in pipe_read()
344 tail = pipe_update_tail(pipe, buf, tail); in pipe_read()
348 if (!pipe_empty(head, tail)) /* More to do? */ in pipe_read()
394 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
397 if (pipe_empty(pipe->head, pipe->tail)) in pipe_read()
420 unsigned int tail = READ_ONCE(pipe->tail); in pipe_writable() local
423 return !pipe_full(head, tail, max_usage) || in pipe_writable()
472 was_empty = pipe_empty(head, pipe->tail); in pipe_write()
506 if (!pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
553 if (!pipe_full(head, pipe->tail, pipe->max_usage)) in pipe_write()
581 was_empty = pipe_empty(pipe->head, pipe->tail); in pipe_write()
585 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) in pipe_write()
618 unsigned int count, head, tail, mask; in pipe_ioctl() local
625 tail = pipe->tail; in pipe_ioctl()
628 while (tail != head) { in pipe_ioctl()
629 count += pipe->bufs[tail & mask].len; in pipe_ioctl()
630 tail++; in pipe_ioctl()
661 unsigned int head, tail; in pipe_poll() local
683 tail = READ_ONCE(pipe->tail); in pipe_poll()
687 if (!pipe_empty(head, tail)) in pipe_poll()
694 if (!pipe_full(head, tail, pipe->max_usage)) in pipe_poll()
1269 unsigned int head, tail, mask, n; in pipe_resize_ring() local
1279 tail = pipe->tail; in pipe_resize_ring()
1281 n = pipe_occupancy(head, tail); in pipe_resize_ring()
1294 unsigned int t = tail & mask; in pipe_resize_ring()
1309 tail = 0; in pipe_resize_ring()
1316 pipe->tail = tail; in pipe_resize_ring()