Lines Matching refs:head
202 unsigned int head = pipe->head;
215 while (!pipe_full(head, tail, pipe->max_usage)) {
216 struct pipe_buffer *buf = &pipe->bufs[head & mask];
225 head++;
226 pipe->head = head;
247 unsigned int head = pipe->head;
255 } else if (pipe_full(head, tail, pipe->max_usage)) {
258 pipe->bufs[head & mask] = *buf;
259 pipe->head = head + 1;
333 used = pipe_occupancy(pipe->head, pipe->tail);
394 pipe->head++;
447 unsigned int head = pipe->head;
452 while (!pipe_empty(head, tail)) {
529 while (pipe_empty(pipe->head, pipe->tail)) {
688 unsigned int head, tail, mask;
707 head = pipe->head;
713 for (n = 0; !pipe_empty(head, tail) && left && n < nbufs; tail++) {
804 unsigned int head, tail, mask, bc = 0;
815 while (pipe_empty(pipe->head, pipe->tail)) {
839 head = pipe->head;
843 while (!pipe_empty(head, tail)) {
874 if (remain && pipe_occupancy(pipe->head, tail) > 0)
975 p_space = pipe->max_usage - pipe_occupancy(pipe->head, pipe->tail);
1063 WARN_ON_ONCE(!pipe_empty(pipe->head, pipe->tail));
1105 pipe->tail = pipe->head = 0;
1209 if (!pipe_full(pipe->head, pipe->tail, pipe->max_usage))
1607 if (!pipe_empty(pipe->head, pipe->tail))
1613 while (pipe_empty(pipe->head, pipe->tail)) {
1643 if (!pipe_full(pipe->head, pipe->tail, pipe->max_usage))
1649 while (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) {
1703 o_head = opipe->head;
1716 i_head = ipipe->head;
1761 opipe->head = o_head;
1786 opipe->head = o_head;
1829 o_head = opipe->head;
1840 i_head = ipipe->head;
1879 opipe->head = o_head;