Lines Matching refs:tail
718 register unsigned int head, tail; in pc_write() local
780 tail = bc->tout; in pc_write()
784 if (tail != bc->tout) in pc_write()
785 tail = bc->tout; in pc_write()
794 tail &= (size - 1); in pc_write()
861 dataLen = (head >= tail) ? (size - (head - tail) - 1) : (tail - head - 1); in pc_write()
932 tail = bc->tout; in pc_write()
934 if (tail != bc->tout) in pc_write()
935 tail = bc->tout; in pc_write()
936 tail &= (size - 1); in pc_write()
939 if (head >= tail) in pc_write()
951 remain = size - (head - tail) - 1; in pc_write()
957 remain = tail - head - 1; in pc_write()
988 dataLen = tail; in pc_write()
1028 unsigned int head, tail; in pc_write_room() local
1046 tail = bc->tout; in pc_write_room()
1048 if (tail != bc->tout) in pc_write_room()
1049 tail = bc->tout; in pc_write_room()
1051 tail &= (ch->txbufsize - 1); in pc_write_room()
1053 if ((remain = tail - head - 1) < 0 ) in pc_write_room()
1076 unsigned int ctail, head, tail; in pc_chars_in_buffer() local
1096 tail = bc->tout; in pc_chars_in_buffer()
1100 if (tail == head && ch->mailbox->cin == ctail && bc->tbusy == 0) in pc_chars_in_buffer()
1106 tail &= (ch->txbufsize - 1); in pc_chars_in_buffer()
1114 if ((remain = tail - head - 1) < 0 ) in pc_chars_in_buffer()
1145 unsigned int tail; in pc_flush_buffer() local
1165 tail = bc->tout; in pc_flush_buffer()
1169 fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0); in pc_flush_buffer()
2213 volatile unsigned int head, tail; in epcapoll() local
2253 tail = ch->mailbox->eout; in epcapoll()
2257 if (head != tail) in epcapoll()
2279 register volatile unsigned int tail, head; in doevent() local
2295 while ((tail = chan0->mailbox->eout) != (head = chan0->mailbox->ein)) in doevent()
2300 eventbuf = (volatile unchar *)bus_to_virt((ulong)(bd->re_map_membase + tail + ISTART)); in doevent()
2413 chan0->mailbox->eout = (tail + 4) & (IMAX - ISTART - 4); in doevent()
2834 register unsigned int tail, head; in receive_data() local
2870 tail = bc->rout & wrapmask; in receive_data()
2872 bytesAvailable = (head - tail) & wrapmask; in receive_data()
2903 wrapgap = (head >= tail) ? head - tail : ch->rxbufsize - tail; in receive_data()
2928 if ((memcpy(rptr, ch->rxptr + tail, dataToRead)) != rptr) in receive_data()
2933 tail = (tail + dataToRead) & wrapmask; in receive_data()
2942 bc->rout = tail; in receive_data()