diff options
author | phk <phk@FreeBSD.org> | 2004-06-26 09:20:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-26 09:20:07 +0000 |
commit | 0567d4ef5fa68876b3d70414d79e61c5cad5db3e (patch) | |
tree | c93b5edd593fd013f81731c196b7d1369e3d5f78 /sys/dev/sio | |
parent | 21a36330b410b4bc4b67ebb64182227996dfb557 (diff) | |
download | FreeBSD-src-0567d4ef5fa68876b3d70414d79e61c5cad5db3e.zip FreeBSD-src-0567d4ef5fa68876b3d70414d79e61c5cad5db3e.tar.gz |
Pick the hotchar out of the tty structure instead of caching private
copies.
No current line disciplines have a dynamically changing hotchar, and
expecting to receive anything sensible during a change in ldisc is
insane so no locking of the hotchar field is necessary.
Diffstat (limited to 'sys/dev/sio')
-rw-r--r-- | sys/dev/sio/sio.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 83b62ff..1dbf3c8 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -216,7 +216,6 @@ struct com_s { u_char last_modem_status; /* last MSR read by intr handler */ u_char prev_modem_status; /* last MSR handled by high level */ - u_char hotchar; /* ldisc-specific char to be handled ASAP */ u_char *ibuf; /* start of input buffer */ u_char *ibufend; /* end of input buffer */ u_char *ibufold; /* old input buffer, to be freed */ @@ -1383,7 +1382,7 @@ open_top: goto open_top; } error = ttyld_open(tp, dev); - com->hotchar = ttyldoptim(tp); + ttyldoptim(tp); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; siosettimeout(); @@ -1424,7 +1423,7 @@ sioclose(dev, flag, mode, td) tp = com->tp; s = spltty(); ttyld_close(tp, flag); - com->hotchar = ttyldoptim(tp); + ttyldoptim(tp); comhardclose(com); ttyclose(tp); siosettimeout(); @@ -1876,7 +1875,7 @@ siointr1(com) recv_data = 0; } ++com->bytes_in; - if (com->hotchar != 0 && recv_data == com->hotchar) + if (com->tp->t_hotchar != 0 && recv_data == com->tp->t_hotchar) swi_sched(sio_fast_ih, 0); ioptr = com->iptr; if (ioptr >= com->ibufend) @@ -2107,7 +2106,7 @@ sioioctl(dev, cmd, data, flag, td) dt->c_ospeed = tp->t_ospeed; } error = ttyioctl(dev, cmd, data, flag, td); - com->hotchar = ttyldoptim(tp); + ttyldoptim(tp); if (error != ENOTTY) return (error); s = spltty(); @@ -2375,7 +2374,7 @@ comparam(tp, t) sio_setreg(com, com_cfcr, com->cfcr_image = cfcr); /* XXX shouldn't call functions while intrs are disabled. */ - com->hotchar = ttyldoptim(tp); + ttyldoptim(tp); mtx_unlock_spin(&sio_lock); splx(s); |