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 Hold the intr lock for the duration ...
details: https://anonhg.NetBSD.org/src/rev/d2c937e58e0b
branches: jmcneill-audiomp3
changeset: 771403:d2c937e58e0b
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Nov 23 15:47:38 2011 +0000
description:
Hold the intr lock for the duration of ad1848_isa_intr().
diffstat:
sys/dev/isa/wss.c | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diffs (59 lines):
diff -r 41553ce10106 -r d2c937e58e0b sys/dev/isa/wss.c
--- a/sys/dev/isa/wss.c Tue Nov 22 22:47:02 2011 +0000
+++ b/sys/dev/isa/wss.c Wed Nov 23 15:47:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wss.c,v 1.69.4.2 2011/11/22 22:47:07 jmcneill Exp $ */
+/* $NetBSD: wss.c,v 1.69.4.3 2011/11/23 15:47:38 jakllsch Exp $ */
/*
* Copyright (c) 1994 John Brezak
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.69.4.2 2011/11/22 22:47:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.69.4.3 2011/11/23 15:47:38 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -73,6 +73,7 @@
"WSS"
};
+int wss_intr(void *);
int wss_getdev(void *, struct audio_device *);
int wss_mixer_set_port(void *, mixer_ctrl_t *);
@@ -133,7 +134,7 @@
madattach(sc);
sc->sc_ad1848.sc_ih = isa_intr_establish(sc->wss_ic, sc->wss_irq,
- IST_EDGE, IPL_SCHED, ad1848_isa_intr, &sc->sc_ad1848);
+ IST_EDGE, IPL_SCHED, wss_intr, &sc->sc_ad1848);
ad1848_isa_attach(&sc->sc_ad1848);
@@ -175,6 +176,23 @@
}
int
+wss_intr(void *addr)
+{
+ struct ad1848_isa_softc *sc;
+ int handled;
+
+ sc = addr;
+
+ mutex_spin_enter(&sc->sc_ad1848.sc_intr_lock);
+
+ handled = ad1848_isa_intr(sc);
+
+ mutex_spin_exit(&sc->sc_ad1848.sc_intr_lock);
+
+ return handled;
+}
+
+int
wss_getdev(void *addr, struct audio_device *retp)
{
Home |
Main Index |
Thread Index |
Old Index