MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tty_flush

Function tty_flush

freebsd/kern/tty.c:1591–1613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1589}
1590
1591void
1592tty_flush(struct tty *tp, int flags)
1593{
1594
1595 if (flags & FWRITE) {
1596 tp->t_flags &= ~TF_HIWAT_OUT;
1597 ttyoutq_flush(&tp->t_outq);
1598 tty_wakeup(tp, FWRITE);
1599 if (!tty_gone(tp)) {
1600 ttydevsw_outwakeup(tp);
1601 ttydevsw_pktnotify(tp, TIOCPKT_FLUSHWRITE);
1602 }
1603 }
1604 if (flags & FREAD) {
1605 tty_hiwat_in_unblock(tp);
1606 ttyinq_flush(&tp->t_inq);
1607 tty_wakeup(tp, FREAD);
1608 if (!tty_gone(tp)) {
1609 ttydevsw_inwakeup(tp);
1610 ttydevsw_pktnotify(tp, TIOCPKT_FLUSHREAD);
1611 }
1612 }
1613}
1614
1615void
1616tty_set_winsize(struct tty *tp, const struct winsize *wsz)

Callers 5

ttydisc_closeFunction · 0.85
ttydisc_modemFunction · 0.85
ttydisc_rintFunction · 0.85
ttydev_closeFunction · 0.85
tty_generic_ioctlFunction · 0.85

Calls 7

ttyoutq_flushFunction · 0.85
tty_wakeupFunction · 0.85
ttydevsw_outwakeupFunction · 0.85
ttydevsw_pktnotifyFunction · 0.85
tty_hiwat_in_unblockFunction · 0.85
ttyinq_flushFunction · 0.85
ttydevsw_inwakeupFunction · 0.85

Tested by

no test coverage detected