We don't need to call dcons_poll event handlers if KDB is not active.
Approved by: re (kensmith)
This commit is contained in:
parent
f183dbca4f
commit
ff038e3a82
@ -241,11 +241,10 @@ dcons_check_break(struct dcons_softc *dc, int c)
|
||||
#endif
|
||||
|
||||
static int
|
||||
dcons_os_checkc(struct dcons_softc *dc)
|
||||
dcons_os_checkc_nopoll(struct dcons_softc *dc)
|
||||
{
|
||||
int c;
|
||||
|
||||
EVENTHANDLER_INVOKE(dcons_poll, 0);
|
||||
if (dg.dma_tag != NULL)
|
||||
bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD);
|
||||
|
||||
@ -257,6 +256,13 @@ dcons_os_checkc(struct dcons_softc *dc)
|
||||
return (c);
|
||||
}
|
||||
|
||||
static int
|
||||
dcons_os_checkc(struct dcons_softc *dc)
|
||||
{
|
||||
EVENTHANDLER_INVOKE(dcons_poll, 0);
|
||||
return (dcons_os_checkc_nopoll(dc));
|
||||
}
|
||||
|
||||
#if defined(GDB) || !defined(CONS_NODEV)
|
||||
static int
|
||||
dcons_os_getc(struct dcons_softc *dc)
|
||||
@ -408,7 +414,7 @@ dcons_timeout(void *v)
|
||||
for (i = 0; i < DCONS_NPORT; i ++) {
|
||||
dc = &sc[i];
|
||||
tp = ((DEV)dc->dev)->si_tty;
|
||||
while ((c = dcons_os_checkc(dc)) != -1)
|
||||
while ((c = dcons_os_checkc_nopoll(dc)) != -1)
|
||||
if (tp->t_state & TS_ISOPEN)
|
||||
#if __FreeBSD_version < 502113
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
|
Loading…
Reference in New Issue
Block a user