Ejemplo n.º 1
0
/*
 * "Interrupt" routine for input through ROM vectors
 */
static void
kd_rom_intr(void *arg)
{
	struct cons_channel *cc = arg;
	int s, c;

	callout_schedule(&prom_cons_callout, hz / 4);

	s = spltty();

	while ((c = prom_peekchar()) >= 0)
		(*cc->cc_upstream)(c);

	splx(s);
}
Ejemplo n.º 2
0
static void 
pcons_poll(void *aux)
{
	struct pconssoftc *sc = aux;
	struct tty *tp = sc->of_tty;
	int c;
	char ch;
	
	while ((c = prom_peekchar()) >= 0) {
		ch = c;
		cn_check_magic(tp->t_dev, ch, pcons_cnm_state);
		if (tp && (tp->t_state & TS_ISOPEN))
			(*tp->t_linesw->l_rint)(ch, tp);
	}
	callout_reset(&sc->sc_poll_ch, 1, pcons_poll, sc);
}