Source-Changes-HG archive

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

[src/jmcneill-audiomp3]: src/sys/dev/pci add gcscaudio_get_locks()



details:   https://anonhg.NetBSD.org/src/rev/9a2e3d0fc040
branches:  jmcneill-audiomp3
changeset: 771326:9a2e3d0fc040
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Nov 19 23:36:38 2011 +0000

description:
add gcscaudio_get_locks()

diffstat:

 sys/dev/pci/gcscaudio.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 11ae1585aad7 -r 9a2e3d0fc040 sys/dev/pci/gcscaudio.c
--- a/sys/dev/pci/gcscaudio.c   Sat Nov 19 23:31:26 2011 +0000
+++ b/sys/dev/pci/gcscaudio.c   Sat Nov 19 23:36:38 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gcscaudio.c,v 1.7.4.1 2011/11/19 23:31:26 jmcneill Exp $       */
+/*     $NetBSD: gcscaudio.c,v 1.7.4.2 2011/11/19 23:36:38 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2008 SHIMIZU Ryo <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.7.4.1 2011/11/19 23:31:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.7.4.2 2011/11/19 23:36:38 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -151,6 +151,7 @@
 static int gcscaudio_trigger_input(void *, void *, void *, int,
                                    void (*)(void *), void *,
                                    const audio_params_t *);
+static void gcscaudio_get_locks(void *, kmutex_t **, kmutex_t **);
 static bool gcscaudio_resume(device_t, const pmf_qual_t *);
 static int gcscaudio_intr(void *);
 
@@ -211,7 +212,8 @@
        .trigger_output         = gcscaudio_trigger_output,
        .trigger_input          = gcscaudio_trigger_input,
        .dev_ioctl              = NULL,
-       .powerstate             = NULL
+       .powerstate             = NULL,
+       .get_locks              = gcscaudio_get_locks,
 };
 
 static const struct audio_format gcscaudio_formats_2ch = {
@@ -1187,6 +1189,17 @@
        return 0;
 }
 
+static void
+gcscaudio_get_locks(void *arg, kmutex_t **intr, kmutex_t **thread)
+{
+       struct gcscaudio_softc *sc;
+
+       sc = (struct gcscaudio_softc *)arg;
+
+       *intr = &sc->sc_intr_lock;
+       *thread = &sc->sc_lock;
+}
+
 static int
 gcscaudio_intr(void *arg)
 {



Home | Main Index | Thread Index | Old Index