Lines Matching refs:head
62 * We use head and tail indices that aren't masked off, except at the point of
222 unsigned int head = READ_ONCE(pipe->head);
226 return !pipe_empty(head, tail) || !writers;
253 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
255 /* Read ->head with a barrier vs post_one_notification() */
256 unsigned int head = smp_load_acquire(&pipe->head);
284 if (!pipe_empty(head, tail)) {
336 if (!pipe_empty(head, tail)) /* More to do? */
381 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
384 if (pipe_empty(pipe->head, pipe->tail))
406 unsigned int head = READ_ONCE(pipe->head);
410 return !pipe_full(head, tail, max_usage) ||
419 unsigned int head;
451 head = pipe->head;
452 was_empty = pipe_empty(head, pipe->tail);
456 struct pipe_buffer *buf = &pipe->bufs[(head - 1) & mask];
485 head = pipe->head;
486 if (!pipe_full(head, pipe->tail, pipe->max_usage)) {
488 struct pipe_buffer *buf = &pipe->bufs[head & mask];
508 head = pipe->head;
509 if (pipe_full(head, pipe->tail, pipe->max_usage)) {
514 pipe->head = head + 1;
518 buf = &pipe->bufs[head & mask];
543 if (!pipe_full(head, pipe->tail, pipe->max_usage))
570 was_empty = pipe_empty(pipe->head, pipe->tail);
574 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage))
607 int count, head, tail, mask;
613 head = pipe->head;
617 while (tail != head) {
650 unsigned int head, tail;
671 head = READ_ONCE(pipe->head);
676 if (!pipe_empty(head, tail))
683 if (!pipe_full(head, tail, pipe->max_usage))
1253 unsigned int head, tail, mask, n;
1262 head = pipe->head;
1265 n = pipe_occupancy(head, tail);
1277 unsigned int h = head & mask;
1292 head = n;
1301 pipe->head = head;