diff options
| author | ad <ad@NetBSD.org> | 2007-11-19 18:51:36 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-11-19 18:51:36 +0000 |
| commit | dc26833bb6ee7a7db1d754e75be908943c06df13 (patch) | |
| tree | f7cbb2593a42316e7bda2f70d8fa4f59c39fb17d /sys/dev/dec | |
| parent | 417cd168ee1056abd531715a8ac3fde2fb191357 (diff) | |
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
Diffstat (limited to 'sys/dev/dec')
| -rw-r--r-- | sys/dev/dec/dz.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/dev/dec/dz.c b/sys/dev/dec/dz.c index f0889641d35..3256049cc8c 100644 --- a/sys/dev/dec/dz.c +++ b/sys/dev/dec/dz.c @@ -1,4 +1,4 @@ -/* $NetBSD: dz.c,v 1.31 2007/11/07 15:56:14 ad Exp $ */ +/* $NetBSD: dz.c,v 1.32 2007/11/19 18:51:46 ad Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.31 2007/11/07 15:56:14 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.32 2007/11/19 18:51:46 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -271,7 +271,7 @@ dzrint(void *arg) cn_check_magic(tp->t_dev, mcc, dz_cnm_state); if (!(tp->t_state & TS_ISOPEN)) { - wakeup((void *)&tp->t_rawq); + clwakeup(&tp->t_rawq); continue; } @@ -584,21 +584,9 @@ dzstart(struct tty *tp) splx(s); return; } - cl = &tp->t_outq; - if (cl->c_cc <= tp->t_lowat) { - if (tp->t_state & TS_ASLEEP) { - tp->t_state &= ~TS_ASLEEP; - wakeup((void *)cl); - } - selwakeup(&tp->t_wsel); - } - if (cl->c_cc == 0) { - splx(s); + if (!ttypull(tp)) return; - } - tp->t_state |= TS_BUSY; - state = dz_read2(sc, sc->sc_dr.dr_tcrw) & 255; if ((state & (1 << line)) == 0) dz_write1(sc, sc->sc_dr.dr_tcr, state | (1 << line)); |
