Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Make locking in pcppi_pckbd_bell() work. Works ...



details:   https://anonhg.NetBSD.org/src/rev/09e7469976f0
branches:  trunk
changeset: 771579:09e7469976f0
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Fri Nov 25 14:31:44 2011 +0000

description:
Make locking in pcppi_pckbd_bell() work.  Works around locking problems
triggered when an X server rings the console bell.

diffstat:

 sys/dev/isa/pcppi.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 9eff0cd7d98c -r 09e7469976f0 sys/dev/isa/pcppi.c
--- a/sys/dev/isa/pcppi.c       Fri Nov 25 13:58:41 2011 +0000
+++ b/sys/dev/isa/pcppi.c       Fri Nov 25 14:31:44 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcppi.c,v 1.38 2011/11/23 23:07:32 jmcneill Exp $ */
+/* $NetBSD: pcppi.c,v 1.39 2011/11/25 14:31:44 jakllsch Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.38 2011/11/23 23:07:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.39 2011/11/25 14:31:44 jakllsch Exp $");
 
 #include "attimer.h"
 
@@ -355,12 +355,12 @@
     int poll)
 {
 
-       KASSERT(mutex_owned(&tty_lock));
+       KASSERT(!mutex_owned(&tty_lock));
 
        /*
         * Comes in as ms, goes out at ticks; volume ignored.
         */
-       pcppi_bell_locked(arg, pitch, (period * hz) / 1000,
+       pcppi_bell(arg, pitch, (period * hz) / 1000,
            poll ? PCPPI_BELL_POLL : 0);
 }
 #endif /* NPCKBD > 0 */



Home | Main Index | Thread Index | Old Index