diff options
author | phk <phk@FreeBSD.org> | 2004-06-04 16:02:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-04 16:02:56 +0000 |
commit | ba3920e2a2eb1a3101ab8286d24d58fef6fd73aa (patch) | |
tree | 3337821fdd2a353d2216412ea8dd39eb5e65f007 /sys/dev/syscons | |
parent | 958f9d7c7609eaa9fcabd83035ded33f80da2f0d (diff) | |
download | FreeBSD-src-ba3920e2a2eb1a3101ab8286d24d58fef6fd73aa.zip FreeBSD-src-ba3920e2a2eb1a3101ab8286d24d58fef6fd73aa.tar.gz |
Machine generated patch which changes linedisc calls from accessing
linesw[] directly to using the ttyld...() functions
The ttyld...() functions ar inline so there is no performance hit.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/syscons.c | 22 | ||||
-rw-r--r-- | sys/dev/syscons/sysmouse.c | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index eb685cf..0608ce5 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -495,13 +495,13 @@ scopen(dev_t dev, int flag, int mode, struct thread *td) tp->t_lflag = TTYDEF_LFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; scparam(tp, &tp->t_termios); - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } else if (tp->t_state & TS_XCLUDE && suser(td)) return(EBUSY); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); scp = sc_get_stat(dev); if (scp == NULL) { @@ -561,7 +561,7 @@ scclose(dev_t dev, int flag, int mode, struct thread *td) DPRINTF(5, ("done.\n")); } spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); spl0(); return(0); @@ -618,23 +618,23 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg) switch (KEYFLAGS(c)) { case 0x0000: /* normal key */ - (*linesw[cur_tty->t_line].l_rint)(KEYCHAR(c), cur_tty); + ttyld_rint(cur_tty, KEYCHAR(c)); break; case FKEY: /* function key, return string */ cp = kbd_get_fkeystr(thiskbd, KEYCHAR(c), &len); if (cp != NULL) { while (len-- > 0) - (*linesw[cur_tty->t_line].l_rint)(*cp++, cur_tty); + ttyld_rint(cur_tty, *cp++); } break; case MKEY: /* meta is active, prepend ESC */ - (*linesw[cur_tty->t_line].l_rint)(0x1b, cur_tty); - (*linesw[cur_tty->t_line].l_rint)(KEYCHAR(c), cur_tty); + ttyld_rint(cur_tty, 0x1b); + ttyld_rint(cur_tty, KEYCHAR(c)); break; case BKEY: /* backtab fixed sequence (esc [ Z) */ - (*linesw[cur_tty->t_line].l_rint)(0x1b, cur_tty); - (*linesw[cur_tty->t_line].l_rint)('[', cur_tty); - (*linesw[cur_tty->t_line].l_rint)('Z', cur_tty); + ttyld_rint(cur_tty, 0x1b); + ttyld_rint(cur_tty, '['); + ttyld_rint(cur_tty, 'Z'); break; } } @@ -3571,7 +3571,7 @@ sc_paste(scr_stat *scp, u_char *p, int count) return; rmap = scp->sc->scr_rmap; for (; count > 0; --count) - (*linesw[tp->t_line].l_rint)(rmap[*p++], tp); + ttyld_rint(tp, rmap[*p++]); } void diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index b513500..69c0ef3 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -92,12 +92,12 @@ smopen(dev_t dev, int flag, int mode, struct thread *td) tp->t_lflag = TTYDEF_LFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; smparam(tp, &tp->t_termios); - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } else if (tp->t_state & TS_XCLUDE && suser(td)) { return EBUSY; } - return (*linesw[tp->t_line].l_open)(dev, tp); + return ttyld_open(tp, dev); } static int @@ -109,7 +109,7 @@ smclose(dev_t dev, int flag, int mode, struct thread *td) tp = dev->si_tty; s = spltty(); mouse_level = 0; - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); splx(s); @@ -306,7 +306,7 @@ sysmouse_event(mouse_info_t *info) buf[2] = y >> 1; buf[4] = y - buf[2]; for (i = 0; i < MOUSE_MSC_PACKETSIZE; ++i) - (*linesw[sysmouse_tty->t_line].l_rint)(buf[i], sysmouse_tty); + ttyld_rint(sysmouse_tty, buf[i]); if (mouse_level >= 1) { /* extended part */ z = imax(imin(z, 127), -128); |