Lines Matching refs:tail
223 unsigned int tail = READ_ONCE(pipe->tail); in pipe_readable() local
226 return !pipe_empty(head, tail) || !writers; in pipe_readable()
253 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
256 unsigned int tail = pipe->tail; in pipe_read() local
283 if (!pipe_empty(head, tail)) { in pipe_read()
284 struct pipe_buffer *buf = &pipe->bufs[tail & mask]; in pipe_read()
328 tail++; in pipe_read()
329 pipe->tail = tail; in pipe_read()
335 if (!pipe_empty(head, tail)) /* More to do? */ in pipe_read()
380 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
383 if (pipe_empty(pipe->head, pipe->tail)) in pipe_read()
406 unsigned int tail = READ_ONCE(pipe->tail); in pipe_writable() local
409 return !pipe_full(head, tail, max_usage) || in pipe_writable()
453 was_empty = pipe_empty(head, pipe->tail); in pipe_write()
487 if (!pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
510 if (pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
544 if (!pipe_full(head, pipe->tail, pipe->max_usage)) in pipe_write()
571 was_empty = pipe_empty(pipe->head, pipe->tail); in pipe_write()
575 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) in pipe_write()
608 int count, head, tail, mask; in pipe_ioctl() local
615 tail = pipe->tail; in pipe_ioctl()
618 while (tail != head) { in pipe_ioctl()
619 count += pipe->bufs[tail & mask].len; in pipe_ioctl()
620 tail++; in pipe_ioctl()
651 unsigned int head, tail; in pipe_poll() local
673 tail = READ_ONCE(pipe->tail); in pipe_poll()
677 if (!pipe_empty(head, tail)) in pipe_poll()
684 if (!pipe_full(head, tail, pipe->max_usage)) in pipe_poll()
1248 unsigned int head, tail, mask, n; in pipe_resize_ring() local
1258 tail = pipe->tail; in pipe_resize_ring()
1259 n = pipe_occupancy(pipe->head, pipe->tail); in pipe_resize_ring()
1274 unsigned int t = tail & mask; in pipe_resize_ring()
1289 tail = 0; in pipe_resize_ring()
1296 pipe->tail = tail; in pipe_resize_ring()