| 1148 | } |
| 1149 | |
| 1150 | size_t |
| 1151 | ttydisc_rint_poll(struct tty *tp) |
| 1152 | { |
| 1153 | size_t l; |
| 1154 | |
| 1155 | tty_assert_locked(tp); |
| 1156 | |
| 1157 | if (ttyhook_hashook(tp, rint_poll)) |
| 1158 | return ttyhook_rint_poll(tp); |
| 1159 | |
| 1160 | /* |
| 1161 | * XXX: Still allow character input when there's no space in the |
| 1162 | * buffers, but we haven't entered the high watermark. This is |
| 1163 | * to allow backspace characters to be inserted when in |
| 1164 | * canonical mode. |
| 1165 | */ |
| 1166 | l = ttyinq_bytesleft(&tp->t_inq); |
| 1167 | if (l == 0 && (tp->t_flags & TF_HIWAT_IN) == 0) |
| 1168 | return (1); |
| 1169 | |
| 1170 | return (l); |
| 1171 | } |
| 1172 | |
| 1173 | static void |
| 1174 | ttydisc_wakeup_watermark(struct tty *tp) |
no test coverage detected