summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-22 16:45:22 +0000
committerbde <bde@FreeBSD.org>1995-07-22 16:45:22 +0000
commit35509aece996a3270a9b30cb7e72b84ed7f0415c (patch)
tree8394b2b46acc5c94b577982d2fdb4c9fa0e24167 /sys/i386
parent18829b9aef82ca3456ff7f260ef55cd9c71e4e18 (diff)
downloadFreeBSD-src-35509aece996a3270a9b30cb7e72b84ed7f0415c.zip
FreeBSD-src-35509aece996a3270a9b30cb7e72b84ed7f0415c.tar.gz
Obtained from: partly from ancient patches of mine via 1.1.5
Give names to the magic tty i/o sleep addresses and use them. This makes it easier to remember what the addresses are for and to keep them unique.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/cx.c2
-rw-r--r--sys/i386/isa/cy.c11
-rw-r--r--sys/i386/isa/rc.c4
-rw-r--r--sys/i386/isa/sio.c14
4 files changed, 11 insertions, 20 deletions
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index ff4b6b7..9fd4b2d 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -55,9 +55,11 @@
# define t_out t_outq
# define RB_LEN(q) ((q).c_cc)
# define RB_GETC(q) getc(&q)
+#ifndef TSA_CARR_ON /* FreeBSD 2.x before not long after 2.0.5 */
# define TSA_CARR_ON(tp) tp
# define TSA_OLOWAT(q) ((caddr_t)&(q)->t_out)
#endif
+#endif
#include <machine/cronyx.h>
#include <i386/isa/cxreg.h>
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 338abb1..20737bf 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.9 1995/07/21 22:51:31 bde Exp $
+ * $Id: cy.c,v 1.10 1995/07/22 01:29:58 bde Exp $
*/
#include "cy.h"
@@ -151,11 +151,6 @@
#define CD1400_xIVR_CHAN_SHIFT 3
#define CD1400_xIVR_CHAN 0x0F /* XXX reduce to pack Cyclom-8Ys */
-/*
- * XXX temporary kludges for 2.0 (XXX TK2.0).
- */
-#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
-
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
#define RS_IBUFSIZE 256
@@ -396,7 +391,7 @@ static u_int com_events; /* input chars + weighted output completions */
static int commajor;
static int sio_timeout;
static int sio_timeouts_until_log;
-#if 0 /* XXX TK2.0 */
+#if 0 /* XXX */
static struct tty *sio_tty[NSIO];
#else
static struct tty sio_tty[NSIO];
@@ -622,7 +617,7 @@ sioopen(dev, flag, mode, p)
return (ENXIO);
if (mynor & CONTROL_MASK)
return (0);
-#if 0 /* XXX TK2.0 */
+#if 0 /* XXX */
tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]);
#else
tp = com->tp = &sio_tty[unit];
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 1db4a3d..07e0264 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -825,7 +825,7 @@ again:
if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev)
&& !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
rc->rc_dcdwaits++;
- error = tsleep(&tp->t_rawq, TTIPRI | PCATCH, "rcdcd", 0);
+ error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0);
rc->rc_dcdwaits--;
if (error != 0)
goto out;
@@ -895,7 +895,7 @@ register struct rc_chans *rc;
}
rc->rc_flags &= ~RC_ACTOUT;
wakeup((caddr_t) &rc->rc_rcb); /* wake bi */
- wakeup((caddr_t) &tp->t_rawq); /* wake dcd */
+ wakeup(TSA_CARR_ON(tp));
(void) splx(s);
}
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 39683e9..fd30f74 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.103 1995/07/21 22:51:34 bde Exp $
+ * $Id: sio.c,v 1.104 1995/07/22 01:30:02 bde Exp $
*/
#include "sio.h"
@@ -66,12 +66,6 @@
#include <i386/isa/sioreg.h>
#include <i386/isa/ic/ns16550.h>
-/*
- * XXX temporary kludges for 2.0 (XXX TK2.0).
- */
-#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
-#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
-
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
#define RS_IBUFSIZE 256
@@ -307,7 +301,7 @@ static u_int com_events; /* input chars + weighted output completions */
static int commajor;
static int sio_timeout;
static int sio_timeouts_until_log;
-#if 0 /* XXX TK2.0 */
+#if 0 /* XXX */
static struct tty *sio_tty[NSIO];
#else
static struct tty sio_tty[NSIO];
@@ -779,7 +773,7 @@ sioopen(dev, flag, mode, p)
return (ENXIO);
if (mynor & CONTROL_MASK)
return (0);
-#if 0 /* XXX TK2.0 */
+#if 0 /* XXX */
tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]);
#else
tp = com->tp = &sio_tty[unit];
@@ -1714,7 +1708,7 @@ retry:
enable_intr();
while ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
!= (LSR_TSRE | LSR_TXRDY)) {
- error = ttysleep(tp, TSA_OCOMPLETE(tp), TTIPRI | PCATCH,
+ error = ttysleep(tp, TSA_OLOWAT(tp), TTIPRI | PCATCH,
"siotx", hz / 100);
if ( txtimeout != 0
&& (!error || error == EAGAIN)
OpenPOWER on IntegriCloud