diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-07-05 13:16:13 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-07-05 13:16:13 +0000 |
commit | 4a8262109893cbb25548e5e0324667e1922ebc2a (patch) | |
tree | 298737de4b12cc4a3348f5d2e5ce70c536f02583 /sys/arch/sparc | |
parent | 44f0545c397e3be36ccb7c3ee7fcdb24feee019d (diff) |
Fix spl-handling in cnstart.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/cons.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/cons.c b/sys/arch/sparc/dev/cons.c index 974db9c8ca8..240e1f4c9f2 100644 --- a/sys/arch/sparc/dev/cons.c +++ b/sys/arch/sparc/dev/cons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.c,v 1.7 2000/06/28 20:22:14 mjacob Exp $ */ +/* $OpenBSD: cons.c,v 1.8 2000/07/05 13:16:12 art Exp $ */ /* $NetBSD: cons.c,v 1.30 1997/07/07 23:30:23 pk Exp $ */ /* @@ -465,19 +465,21 @@ cnstart(tp) } else putc.v1 = promvec->pv_putchar; while (tp->t_outq.c_cc) { + int ss; + c = getc(&tp->t_outq); /* * *%&!*& ROM monitor console putchar is not reentrant! * splhigh/tty around it so as not to run so long with * clock interrupts blocked. */ - (void) splhigh(); + ss = splhigh(); if (v > 2) { unsigned char c0 = c & 0177; (*putc.v3)(fd, &c0, 1); } else (*putc.v1)(c & 0177); - (void) spltty(); + splx(ss); } if (tp->t_state & TS_ASLEEP) { /* can't happen? */ tp->t_state &= ~TS_ASLEEP; @@ -525,6 +527,9 @@ cnfbstart(tp) } if (tp->t_outq.c_cc) { tp->t_state |= TS_BUSY; + /* + * XXX - this is just too ugly. + */ if (s == 0) { (void) splsoftclock(); cnfbdma((void *)tp); |