summaryrefslogtreecommitdiffstats
path: root/sys/dev/dcons
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2007-08-17 05:32:39 +0000
committersimokawa <simokawa@FreeBSD.org>2007-08-17 05:32:39 +0000
commitb906b986a3da7a75d75997cccfb16700c9688488 (patch)
treef6a842a2c450e7a0c6f6e565bcbfe8277b91a959 /sys/dev/dcons
parent501b1be8fa4f03c54d8a2a6231af575286972b2e (diff)
downloadFreeBSD-src-b906b986a3da7a75d75997cccfb16700c9688488.zip
FreeBSD-src-b906b986a3da7a75d75997cccfb16700c9688488.tar.gz
We don't need to call dcons_poll event handlers if KDB is not active.
Approved by: re (kensmith)
Diffstat (limited to 'sys/dev/dcons')
-rw-r--r--sys/dev/dcons/dcons_os.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c
index 63f2522..d47515c 100644
--- a/sys/dev/dcons/dcons_os.c
+++ b/sys/dev/dcons/dcons_os.c
@@ -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);
OpenPOWER on IntegriCloud