| 1260 | } |
| 1261 | |
| 1262 | size_t |
| 1263 | ttydisc_getc_poll(struct tty *tp) |
| 1264 | { |
| 1265 | |
| 1266 | tty_assert_locked(tp); |
| 1267 | |
| 1268 | if (tp->t_flags & TF_STOPPED) |
| 1269 | return (0); |
| 1270 | |
| 1271 | if (ttyhook_hashook(tp, getc_poll)) |
| 1272 | return ttyhook_getc_poll(tp); |
| 1273 | |
| 1274 | return ttyoutq_bytesused(&tp->t_outq); |
| 1275 | } |
| 1276 | |
| 1277 | /* |
| 1278 | * XXX: not really related to the TTYDISC, but we'd better put |
no test coverage detected