aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-09-10 19:14:49 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-09-10 19:14:49 +0000
commit9545a0eaa495284d00e773c17bb9981265e162dc (patch)
tree06d0ffff45cec4728969215e17a23ed79fc8caaf /sys/dev
parent80f495ec7ef621236131e553acf05f59bd26d6c4 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/syscons/syscons.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index e2651b6b7646f..533596d045b4d 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.168 1996/09/08 21:31:56 sos Exp $
+ * $Id: syscons.c,v 1.169 1996/09/09 19:02:26 sos Exp $
*/
#include "sc.h"
@@ -164,6 +164,7 @@ static int scattach(struct isa_device *dev);
static int scparam(struct tty *tp, struct termios *t);
static int scprobe(struct isa_device *dev);
static void scstart(struct tty *tp);
+static void scmousestart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
static scr_stat *get_scr_stat(dev_t dev);
@@ -519,7 +520,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
if (!tp)
return(ENXIO);
- tp->t_oproc = (minor(dev) == SC_MOUSE) ? NULL : scstart;
+ tp->t_oproc = (minor(dev) == SC_MOUSE) ? scmousestart : scstart;
tp->t_param = scparam;
tp->t_dev = dev;
if (!(tp->t_state & TS_ISOPEN)) {
@@ -1338,6 +1339,26 @@ scstart(struct tty *tp)
splx(s);
}
+static void
+scmousestart(struct tty *tp)
+{
+ struct clist *rbp;
+ int s;
+ u_char buf[PCBURST];
+
+ s = spltty();
+ if (!(tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))) {
+ tp->t_state |= TS_BUSY;
+ rbp = &tp->t_outq;
+ while (rbp->c_cc) {
+ q_to_b(rbp, buf, PCBURST);
+ }
+ tp->t_state &= ~TS_BUSY;
+ ttwwakeup(tp);
+ }
+ splx(s);
+}
+
void
sccnprobe(struct consdev *cp)
{