head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
/*
 * The actual work of checking for, and handling, available reads.  This is
 * used in both polled and interrupt-driven modes, as JTAG UARTs may be hooked
 * up with, or without, IRQs allocated.
 */
The actual work of checking for, and handling, available reads.  This is
used in both polled and interrupt-driven modes, as JTAG UARTs may be hooked
up with, or without, IRQs allocated.
The actual work of checking for and handling available reads . This is used in both polled and interrupt - driven modes as JTAG UARTs may be hooked up with or without IRQs allocated .
static void
aju_handle_input(struct altera_jtag_uart_softc *sc, struct tty *tp)
{
	int c;
	tty_lock_assert(tp, MA_OWNED);
	AJU_LOCK_ASSERT(sc);
	while (aju_readable(sc)) {
		c = aju_read(sc);
		AJU_UNLOCK(sc);
#ifdef KDB
		if (sc->ajus_flags & ALTERA_JTAG_UART_FLAG_CONSOLE)
			kdb_alt_break(c, &sc->ajus_alt_break_state);
#endif
		ttydisc_rint(tp, c, 0);
		AJU_LOCK(sc);
	}
	AJU_UNLOCK(sc);
	ttydisc_rint_done(tp);
	AJU_LOCK(sc);
}
static void aju_handle_input ( struct altera_jtag_uart_softc * sc , struct tty * tp ) { int c ; tty_lock_assert ( tp , MA_OWNED ) ; AJU_LOCK_ASSERT ( sc ) ; while ( aju_readable ( sc ) ) { c = aju_read ( sc ) ; AJU_UNLOCK ( sc ) ; #ifdef KDB if ( sc -> ajus_flags & ALTERA_JTAG_UART_FLAG_CONSOLE ) kdb_alt_break ( c , & sc -> ajus_alt_break_state ) ; #endif ttydisc_rint ( tp , c , 0 ) ; AJU_LOCK ( sc ) ; } AJU_UNLOCK ( sc ) ; ttydisc_rint_done ( tp ) ; AJU_LOCK ( sc ) ; }
The actual work of checking for, and handling, available reads.
The actual work of checking for and handling available reads .