Source-Changes-HG archive

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

[src/jmcneill-audiomp3]: src/sys/dev/isa improve the last change, after discu...



details:   https://anonhg.NetBSD.org/src/rev/f19b794696cb
branches:  jmcneill-audiomp3
changeset: 771378:f19b794696cb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 20 19:44:50 2011 +0000

description:
improve the last change, after discussing it with rmind

diffstat:

 sys/dev/isa/sbdsp.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r cf1abecaebee -r f19b794696cb sys/dev/isa/sbdsp.c
--- a/sys/dev/isa/sbdsp.c       Sun Nov 20 19:26:34 2011 +0000
+++ b/sys/dev/isa/sbdsp.c       Sun Nov 20 19:44:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbdsp.c,v 1.134.12.2 2011/11/20 19:26:05 jmcneill Exp $        */
+/*     $NetBSD: sbdsp.c,v 1.134.12.3 2011/11/20 19:44:50 jmcneill Exp $        */
 
 /*-
  * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.134.12.2 2011/11/20 19:26:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.134.12.3 2011/11/20 19:44:50 jmcneill Exp $");
 
 #include "midi.h"
 #include "mpu.h"
@@ -1095,7 +1095,11 @@
 void
 sbdsp_pause(struct sbdsp_softc *sc)
 {
-       delay(100000);  /* 1/10th of a second */
+
+       KASSERT(mutex_owned(&sc->sc_intr_lock));
+       mutex_spin_exit(&sc->sc_intr_lock);
+       (void)kpause("sbpause", false, hz/8, &sc->sc_lock);
+       mutex_spin_enter(&sc->sc_intr_lock);
 }
 
 /*



Home | Main Index | Thread Index | Old Index