| 1589 | } |
| 1590 | |
| 1591 | void |
| 1592 | tty_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 | |
| 1615 | void |
| 1616 | tty_set_winsize(struct tty *tp, const struct winsize *wsz) |
no test coverage detected