Lines Matching refs:tail
156 size_t tail, size_t n) in tty_copy_to_user() argument
159 size_t size = N_TTY_BUF_SIZE - tail; in tty_copy_to_user()
160 const void *from = read_buf_addr(ldata, tail); in tty_copy_to_user()
615 size_t tail; in __process_echoes() local
620 tail = ldata->echo_tail; in __process_echoes()
621 while (MASK(ldata->echo_commit) != MASK(tail)) { in __process_echoes()
622 c = echo_buf(ldata, tail); in __process_echoes()
632 if (MASK(ldata->echo_commit) == MASK(tail + 1)) in __process_echoes()
639 op = echo_buf(ldata, tail + 1); in __process_echoes()
645 if (MASK(ldata->echo_commit) == MASK(tail + 2)) in __process_echoes()
647 num_chars = echo_buf(ldata, tail + 2); in __process_echoes()
673 tail += 3; in __process_echoes()
678 tail += 2; in __process_echoes()
684 tail += 2; in __process_echoes()
696 tail += 2; in __process_echoes()
717 tail += 2; in __process_echoes()
734 tail += 1; in __process_echoes()
741 while (ldata->echo_commit > tail && in __process_echoes()
742 ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) { in __process_echoes()
743 if (echo_buf(ldata, tail) == ECHO_OP_START) { in __process_echoes()
744 if (echo_buf(ldata, tail + 1) == ECHO_OP_ERASE_TAB) in __process_echoes()
745 tail += 3; in __process_echoes()
747 tail += 2; in __process_echoes()
749 tail++; in __process_echoes()
753 ldata->echo_tail = tail; in __process_echoes()
1039 size_t tail = ldata->read_head; in eraser() local
1048 while (MASK(tail) != MASK(ldata->canon_head)) { in eraser()
1049 tail--; in eraser()
1050 c = read_buf(ldata, tail); in eraser()
1318 size_t tail = ldata->canon_head; in n_tty_receive_char_special() local
1323 while (MASK(tail) != MASK(ldata->read_head)) { in n_tty_receive_char_special()
1324 echo_char(read_buf(ldata, tail), tty); in n_tty_receive_char_special()
1325 tail++; in n_tty_receive_char_special()
1706 size_t tail = smp_load_acquire(&ldata->read_tail); in n_tty_receive_buf_common() local
1708 room = N_TTY_BUF_SIZE - (ldata->read_head - tail); in n_tty_receive_buf_common()
1713 overflow = ldata->icanon && ldata->canon_head == tail; in n_tty_receive_buf_common()
1957 size_t tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); in copy_from_read_buf() local
1960 n = min(head - ldata->read_tail, N_TTY_BUF_SIZE - tail); in copy_from_read_buf()
1963 const unsigned char *from = read_buf_addr(ldata, tail); in copy_from_read_buf()
2009 size_t tail; in canon_copy_from_read_buf() local
2018 tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); in canon_copy_from_read_buf()
2019 size = min_t(size_t, tail + n, N_TTY_BUF_SIZE); in canon_copy_from_read_buf()
2022 __func__, *nr, tail, n, size); in canon_copy_from_read_buf()
2024 eol = find_next_bit(ldata->read_flags, size, tail); in canon_copy_from_read_buf()
2025 more = n - (size - tail); in canon_copy_from_read_buf()
2033 n = eol - tail; in canon_copy_from_read_buf()
2044 __func__, eol, found, n, c, tail, more); in canon_copy_from_read_buf()
2046 ret = tty_copy_to_user(tty, *b, tail, n); in canon_copy_from_read_buf()
2127 size_t tail; in n_tty_read() local
2159 tail = ldata->read_tail; in n_tty_read()
2250 if (tail != ldata->read_tail) in n_tty_read()
2415 size_t nr, head, tail; in inq_canon() local
2420 tail = ldata->read_tail; in inq_canon()
2421 nr = head - tail; in inq_canon()
2423 while (MASK(head) != MASK(tail)) { in inq_canon()
2424 if (test_bit(tail & (N_TTY_BUF_SIZE - 1), ldata->read_flags) && in inq_canon()
2425 read_buf(ldata, tail) == __DISABLED_CHAR) in inq_canon()
2427 tail++; in inq_canon()