Lines Matching refs:head
222 unsigned int head = READ_ONCE(pipe->head); 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 head = smp_load_acquire(&pipe->head); in pipe_read() local
284 if (!pipe_empty(head, tail)) { in pipe_read()
336 if (!pipe_empty(head, tail)) /* More to do? */ in pipe_read()
382 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
385 if (pipe_empty(pipe->head, pipe->tail)) in pipe_read()
408 unsigned int head = READ_ONCE(pipe->head); in pipe_writable() local
412 return !pipe_full(head, tail, max_usage) || in pipe_writable()
421 unsigned int head; in pipe_write() local
456 head = pipe->head; in pipe_write()
459 if (chars && !pipe_empty(head, pipe->tail)) { in pipe_write()
461 struct pipe_buffer *buf = &pipe->bufs[(head - 1) & mask]; in pipe_write()
490 head = pipe->head; in pipe_write()
491 if (!pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
493 struct pipe_buffer *buf = &pipe->bufs[head & mask]; in pipe_write()
513 head = pipe->head; in pipe_write()
514 if (pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
519 pipe->head = head + 1; in pipe_write()
523 buf = &pipe->bufs[head & mask]; in pipe_write()
548 if (!pipe_full(head, pipe->tail, pipe->max_usage)) in pipe_write()
576 was_empty = pipe_empty(pipe->head, pipe->tail); in pipe_write()
580 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) in pipe_write()
611 int count, head, tail, mask; in pipe_ioctl() local
617 head = pipe->head; in pipe_ioctl()
621 while (tail != head) { in pipe_ioctl()
654 unsigned int head, tail; in pipe_poll() local
672 head = READ_ONCE(pipe->head); in pipe_poll()
677 if (!pipe_empty(head, tail)) in pipe_poll()
684 if (!pipe_full(head, tail, pipe->max_usage)) in pipe_poll()
1254 unsigned int head, tail, mask, n; in pipe_resize_ring() local
1263 head = pipe->head; in pipe_resize_ring()
1266 n = pipe_occupancy(head, tail); in pipe_resize_ring()
1278 unsigned int h = head & mask; in pipe_resize_ring()
1293 head = n; in pipe_resize_ring()
1302 pipe->head = head; in pipe_resize_ring()