Lines Matching refs:head
223 unsigned int head = READ_ONCE(pipe->head); in pipe_readable() local
227 return !pipe_empty(head, tail) || !writers; in pipe_readable()
254 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read()
257 unsigned int head = smp_load_acquire(&pipe->head); in pipe_read() local
285 if (!pipe_empty(head, tail)) { in pipe_read()
337 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()
407 unsigned int head = READ_ONCE(pipe->head); in pipe_writable() local
411 return !pipe_full(head, tail, max_usage) || in pipe_writable()
420 unsigned int head; in pipe_write() local
452 head = pipe->head; in pipe_write()
453 was_empty = pipe_empty(head, pipe->tail); in pipe_write()
457 struct pipe_buffer *buf = &pipe->bufs[(head - 1) & mask]; in pipe_write()
486 head = pipe->head; in pipe_write()
487 if (!pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
489 struct pipe_buffer *buf = &pipe->bufs[head & mask]; in pipe_write()
509 head = pipe->head; in pipe_write()
510 if (pipe_full(head, pipe->tail, pipe->max_usage)) { in pipe_write()
515 pipe->head = head + 1; in pipe_write()
519 buf = &pipe->bufs[head & mask]; 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 unsigned int count, head, tail, mask; in pipe_ioctl() local
614 head = pipe->head; in pipe_ioctl()
618 while (tail != head) { in pipe_ioctl()
651 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()