syscons.c (9483) | syscons.c (9484) |
---|---|
1/*- 2 * Copyright (c) 1992-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1992-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $Id: syscons.c,v 1.118 1995/06/14 05:16:12 bde Exp $ | 28 * $Id: syscons.c,v 1.119 1995/07/11 17:59:22 bde Exp $ |
29 */ 30 31#include "sc.h" 32#include "apm.h" 33#if NSC > 0 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 1039 unchanged lines hidden (view full) --- 1076 return(error); 1077 error = ttioctl(tp, cmd, data, flag); 1078 if (error >= 0) 1079 return(error); 1080 return(ENOTTY); 1081} 1082 1083void | 29 */ 30 31#include "sc.h" 32#include "apm.h" 33#if NSC > 0 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 1039 unchanged lines hidden (view full) --- 1076 return(error); 1077 error = ttioctl(tp, cmd, data, flag); 1078 if (error >= 0) 1079 return(error); 1080 return(ENOTTY); 1081} 1082 1083void |
1084scxint(dev_t dev) 1085{ 1086 struct tty *tp = scdevtotty(dev); 1087 1088 if (!tp) 1089 return; 1090 tp->t_state &= ~TS_BUSY; 1091 if (tp->t_line) 1092 (*linesw[tp->t_line].l_start)(tp); 1093 else 1094 scstart(tp); 1095} 1096 1097void | |
1098scstart(struct tty *tp) 1099{ 1100 struct clist *rbp; 1101 int i, s, len; 1102 u_char buf[PCBURST]; 1103 scr_stat *scp = get_scr_stat(tp->t_dev); 1104 | 1084scstart(struct tty *tp) 1085{ 1086 struct clist *rbp; 1087 int i, s, len; 1088 u_char buf[PCBURST]; 1089 scr_stat *scp = get_scr_stat(tp->t_dev); 1090 |
1091 /* XXX who repeats the call when the above flags are cleared? */ |
|
1105 if (scp->status & SLKED || blink_in_progress) 1106 return; 1107 s = spltty(); | 1092 if (scp->status & SLKED || blink_in_progress) 1093 return; 1094 s = spltty(); |
1108 if (!(tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))) { | 1095 if (!(tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))) { |
1109 tp->t_state |= TS_BUSY; | 1096 tp->t_state |= TS_BUSY; |
1110 splx(s); | |
1111 rbp = &tp->t_outq; 1112 while (rbp->c_cc) { 1113 len = q_to_b(rbp, buf, PCBURST); | 1097 rbp = &tp->t_outq; 1098 while (rbp->c_cc) { 1099 len = q_to_b(rbp, buf, PCBURST); |
1100 splx(s); |
|
1114 ansi_put(scp, buf, len); | 1101 ansi_put(scp, buf, len); |
1102 s = spltty(); |
|
1115 } | 1103 } |
1116 s = spltty(); | |
1117 tp->t_state &= ~TS_BUSY; 1118 if (rbp->c_cc <= tp->t_lowat) { 1119 if (tp->t_state & TS_ASLEEP) { 1120 tp->t_state &= ~TS_ASLEEP; 1121 wakeup((caddr_t)rbp); 1122 } 1123 selwakeup(&tp->t_wsel); 1124 } --- 1962 unchanged lines hidden --- | 1104 tp->t_state &= ~TS_BUSY; 1105 if (rbp->c_cc <= tp->t_lowat) { 1106 if (tp->t_state & TS_ASLEEP) { 1107 tp->t_state &= ~TS_ASLEEP; 1108 wakeup((caddr_t)rbp); 1109 } 1110 selwakeup(&tp->t_wsel); 1111 } --- 1962 unchanged lines hidden --- |