--- Net2/arch/i386/isa/pccons.c 2018/04/24 18:04:01 1.1 +++ Net2/arch/i386/isa/pccons.c 2018/04/24 18:05:02 1.1.1.2 @@ -35,6 +35,7 @@ * * @(#)pccons.c 5.11 (Berkeley) 5/21/91 */ +static char rcsid[] = "$Header: /var/lib/cvsd/net2/Net2/arch/i386/isa/pccons.c,v 1.1.1.2 2018/04/24 18:05:02 root Exp $"; /* * code to work keyboard & display for PC-style console @@ -99,6 +100,7 @@ int pcparam(); int ttrstrt(); char partab[]; +extern pcopen __P((dev_t, int, int, struct proc *)); /* * Wait for CP to accept last CP command sent * before setting up next command. @@ -286,10 +288,10 @@ pcstart(tp) if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP)) goto out; do { - if (tp->t_outq.c_cc <= tp->t_lowat) { + if (RB_LEN(&tp->t_out) <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((caddr_t)&tp->t_out); } if (tp->t_wsel) { selwakeup(tp->t_wsel, tp->t_state & TS_WCOLL); @@ -297,9 +299,9 @@ pcstart(tp) tp->t_state &= ~TS_WCOLL; } } - if (tp->t_outq.c_cc == 0) + if (RB_LEN(&tp->t_out) == 0) goto out; - c = getc(&tp->t_outq); + c = getc(&tp->t_out); splx(s); sput(c,0x7); s = spltty(); @@ -312,7 +314,6 @@ pccnprobe(cp) struct consdev *cp; { int maj; - extern int pcopen(); /* locate the major number */ for (maj = 0; maj < nchrdev; maj++) @@ -832,10 +833,10 @@ getchar() /*}*/ } -#include "machine/dbg.h" #include "machine/stdarg.h" static nrow; +#define DPAUSE 1 void #ifdef __STDC__ dprintf(unsigned flgs, const char *fmt, ...)