Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Call ws routines at spltty() from interrupt rout...
details: https://anonhg.NetBSD.org/src/rev/ff99c9d41722
branches: trunk
changeset: 472828:ff99c9d41722
user: augustss <augustss%NetBSD.org@localhost>
date: Sun May 09 15:10:30 1999 +0000
description:
Call ws routines at spltty() from interrupt routines.
diffstat:
sys/dev/usb/ukbd.c | 10 +++++++++-
sys/dev/usb/ums.c | 8 ++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diffs (84 lines):
diff -r cdb7e8a889ce -r ff99c9d41722 sys/dev/usb/ukbd.c
--- a/sys/dev/usb/ukbd.c Sun May 09 14:38:01 1999 +0000
+++ b/sys/dev/usb/ukbd.c Sun May 09 15:10:30 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukbd.c,v 1.29 1999/05/06 19:12:23 thorpej Exp $ */
+/* $NetBSD: ukbd.c,v 1.30 1999/05/09 15:10:30 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -460,6 +460,7 @@
struct ukbd_data *ud = &sc->sc_ndata;
int mod, omod;
u_int16_t ibuf[MAXKEYS]; /* chars events */
+ int s;
int nkeys, i, j;
int key;
#define ADDKEY(c) ibuf[nkeys++] = (c)
@@ -556,7 +557,9 @@
cbuf[j]));
j++;
}
+ s = spltty();
wskbd_rawinput(sc->sc_wskbddev, cbuf, j);
+ splx(s);
untimeout(ukbd_rawrepeat, sc);
if (npress != 0) {
sc->sc_nrep = npress;
@@ -566,12 +569,14 @@
}
#endif
+ s = spltty();
for (i = 0; i < nkeys; i++) {
key = ibuf[i];
wskbd_input(sc->sc_wskbddev,
key&RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN,
key&CODEMASK);
}
+ splx(s);
#elif defined(__FreeBSD__)
/* XXX shouldn't the keys be used? */
@@ -624,8 +629,11 @@
void *v;
{
struct ukbd_softc *sc = v;
+ int s;
+ s = spltty();
wskbd_rawinput(sc->sc_wskbddev, sc->sc_rep, sc->sc_nrep);
+ splx(s);
timeout(ukbd_rawrepeat, sc, hz * REP_DELAYN / 1000);
}
#endif
diff -r cdb7e8a889ce -r ff99c9d41722 sys/dev/usb/ums.c
--- a/sys/dev/usb/ums.c Sun May 09 14:38:01 1999 +0000
+++ b/sys/dev/usb/ums.c Sun May 09 15:10:30 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ums.c,v 1.22 1999/01/12 22:06:48 augustss Exp $ */
+/* $NetBSD: ums.c,v 1.23 1999/05/09 15:10:31 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -411,6 +411,7 @@
int dx, dy, dz;
u_char buttons = 0;
int i;
+ int s;
#if defined(__NetBSD__)
#define UMS_BUT(i) ((i) == 1 || (i) == 2 ? 3 - (i) : i)
@@ -448,8 +449,11 @@
DPRINTFN(10, ("ums_intr: x:%d y:%d z:%d buttons:0x%x\n",
dx, dy, dz, buttons));
sc->sc_buttons = buttons;
- if (sc->sc_wsmousedev)
+ if (sc->sc_wsmousedev) {
+ s = spltty();
wsmouse_input(sc->sc_wsmousedev, buttons, dx, dy, dz);
+ splx(s);
+ }
#elif defined(__FreeBSD__)
if (dx || dy || dz || buttons != sc->status.button) {
DPRINTFN(10, ("ums_intr: x:%d y:%d z:%d buttons:0x%x\n",
Home |
Main Index |
Thread Index |
Old Index