Lines Matching refs:head
63 * We use head and tail indices that aren't masked off, except at the point of
223 unsigned int head = READ_ONCE(pipe->head);
227 return !pipe_empty(head, tail) || !writers;
254 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
256 /* Read ->head with a barrier vs post_one_notification() */
257 unsigned int head = smp_load_acquire(&pipe->head);
285 if (!pipe_empty(head, tail)) {
337 if (!pipe_empty(head, tail)) /* More to do? */
383 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
386 if (pipe_empty(pipe->head, pipe->tail))
408 unsigned int head = READ_ONCE(pipe->head);
412 return !pipe_full(head, tail, max_usage) ||
421 unsigned int head;
453 head = pipe->head;
454 was_empty = pipe_empty(head, pipe->tail);
458 struct pipe_buffer *buf = &pipe->bufs[(head - 1) & mask];
487 head = pipe->head;
488 if (!pipe_full(head, pipe->tail, pipe->max_usage)) {
510 head = pipe->head;
511 if (pipe_full(head, pipe->tail, pipe->max_usage)) {
516 pipe->head = head + 1;
520 buf = &pipe->bufs[head & mask];
544 if (!pipe_full(head, pipe->tail, pipe->max_usage))
572 was_empty = pipe_empty(pipe->head, pipe->tail);
576 if (pipe_full(pipe->head, pipe->tail, pipe->max_usage))
609 unsigned int count, head, tail, mask;
615 head = pipe->head;
619 while (tail != head) {
652 unsigned int head, tail;
673 head = READ_ONCE(pipe->head);
678 if (!pipe_empty(head, tail))
685 if (!pipe_full(head, tail, pipe->max_usage))
1258 unsigned int head, tail, mask, n;
1267 head = pipe->head;
1270 n = pipe_occupancy(head, tail);
1282 unsigned int h = head & mask;
1297 head = n;
1306 pipe->head = head;