sys/dev/usbmisc/ucom/ucom.c
static void
disc_optim(struct tty *tp, struct termios *t, struct ucom_softc *sc)
{
	ASSERT_LWKT_TOKEN_HELD(&tty_token);
	if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON))
	    && (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK))
	    && (!(t->c_iflag & PARMRK)
		|| (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK))
	    && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN))
	    && linesw[tp->t_line].l_rint == ttyinput) {
		DPRINTF(("disc_optim: bypass l_rint\n"));
		tp->t_state |= TS_CAN_BYPASS_L_RINT;
	} else {
		DPRINTF(("disc_optim: can't bypass l_rint\n"));
		tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
	}
	sc->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
 * NOTE: Must be called with tty_token held.
 */
Must be called with tty_token held.
Must be called with tty_token held .
static void
disc_optim(struct tty *tp, struct termios *t, struct ucom_softc *sc)
{
	ASSERT_LWKT_TOKEN_HELD(&tty_token);
	if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON))
	    && (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK))
	    && (!(t->c_iflag & PARMRK)
		|| (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK))
	    && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN))
	    && linesw[tp->t_line].l_rint == ttyinput) {
		DPRINTF(("disc_optim: bypass l_rint\n"));
		tp->t_state |= TS_CAN_BYPASS_L_RINT;
	} else {
		DPRINTF(("disc_optim: can't bypass l_rint\n"));
		tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
	}
	sc->hotchar = linesw[tp->t_line].l_hotchar;
}
static void disc_optim ( struct tty * tp , struct termios * t , struct ucom_softc * sc ) { ASSERT_LWKT_TOKEN_HELD ( & tty_token ) ; if ( ! ( t -> c_iflag & ( ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON ) ) && ( ! ( t -> c_iflag & BRKINT ) || ( t -> c_iflag & IGNBRK ) ) && ( ! ( t -> c_iflag & PARMRK ) || ( t -> c_iflag & ( IGNPAR | IGNBRK ) ) == ( IGNPAR | IGNBRK ) ) && ! ( t -> c_lflag & ( ECHO | ICANON | IEXTEN | ISIG | PENDIN ) ) && linesw [ tp -> t_line ] . l_rint == ttyinput ) { DPRINTF ( ( " \n " ) ) ; tp -> t_state |= TS_CAN_BYPASS_L_RINT ; } else { DPRINTF ( ( " \n " ) ) ; tp -> t_state &= ~ TS_CAN_BYPASS_L_RINT ; } sc -> hotchar = linesw [ tp -> t_line ] . l_hotchar ; }
NOTE: Must be called with tty_token held.
NOTE : Must be called with tty_token held .