| 1346 | } |
| 1347 | |
| 1348 | size_t ttydisc_rint_poll(struct lwp_tty *tp) |
| 1349 | { |
| 1350 | size_t l; |
| 1351 | |
| 1352 | tty_assert_locked(tp); |
| 1353 | |
| 1354 | #ifdef USING_BSD_HOOK |
| 1355 | if (ttyhook_hashook(tp, rint_poll)) |
| 1356 | return ttyhook_rint_poll(tp); |
| 1357 | #endif |
| 1358 | |
| 1359 | /* |
| 1360 | * XXX: Still allow character input when there's no space in the |
| 1361 | * buffers, but we haven't entered the high watermark. This is |
| 1362 | * to allow backspace characters to be inserted when in |
| 1363 | * canonical mode. |
| 1364 | */ |
| 1365 | l = ttyinq_bytesleft(&tp->t_inq); |
| 1366 | if (l == 0 && (tp->t_flags & TF_HIWAT_IN) == 0) |
| 1367 | return (1); |
| 1368 | |
| 1369 | return (l); |
| 1370 | } |
| 1371 | |
| 1372 | static void ttydisc_wakeup_watermark(struct lwp_tty *tp) |
| 1373 | { |
no test coverage detected