MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ttydisc_rint_poll

Function ttydisc_rint_poll

components/lwp/terminal/freebsd/tty_ttydisc.c:1348–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348size_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
1372static void ttydisc_wakeup_watermark(struct lwp_tty *tp)
1373{

Callers 2

ptsdev_pollFunction · 0.85
pts_kqops_write_eventFunction · 0.85

Calls 1

ttyinq_bytesleftFunction · 0.85

Tested by

no test coverage detected