Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons remove a diagnostic panic in the keyboard aut...



details:   https://anonhg.NetBSD.org/src/rev/9d68dfbff079
branches:  trunk
changeset: 467700:9d68dfbff079
user:      drochner <drochner%NetBSD.org@localhost>
date:      Sat Mar 27 11:22:23 1999 +0000

description:
remove a diagnostic panic in the keyboard autorepeat timeout() handler.
There is a rece condition which might trigger this but is harmless
otherwise. Leave the handler silently instead.

diffstat:

 sys/dev/wscons/wskbd.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 70c395c03b8c -r 9d68dfbff079 sys/dev/wscons/wskbd.c
--- a/sys/dev/wscons/wskbd.c    Sat Mar 27 11:14:50 1999 +0000
+++ b/sys/dev/wscons/wskbd.c    Sat Mar 27 11:22:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.19 1999/01/26 17:08:37 drochner Exp $ */
+/* $NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
 static const char _copyright[] __attribute__ ((unused)) =
     "Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.";
 static const char _rcsid[] __attribute__ ((unused)) =
-    "$NetBSD: wskbd.c,v 1.19 1999/01/26 17:08:37 drochner Exp $";
+    "$NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $";
 
 /*
  * Copyright (c) 1992, 1993
@@ -352,7 +352,14 @@
        struct wskbd_softc *sc = (struct wskbd_softc *)v;
        int s = spltty();
 
-       KASSERT(sc->sc_repeating);
+       if (!sc->sc_repeating) {
+               /*
+                * race condition: a "key up" event came in when wskbd_repeat()
+                * was already called but not yet spltty()'d
+                */
+               splx(s);
+               return;
+       }
        if (sc->sc_displaydv != NULL)
                wsdisplay_kbdinput(sc->sc_displaydv, sc->sc_repeatsym);
        timeout(wskbd_repeat, sc,



Home | Main Index | Thread Index | Old Index