Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Restore the use of sc_intr_lock as it was in rev 1.334.
details: https://anonhg.NetBSD.org/src/rev/28acc39006bc
branches: trunk
changeset: 353610:28acc39006bc
user: nat <nat%NetBSD.org@localhost>
date: Sun May 14 10:08:49 2017 +0000
description:
Restore the use of sc_intr_lock as it was in rev 1.334.
The ring buffer pages are now wired so the use of the interrupt lock won't
cause panics.
Ok riastradh@.
diffstat:
sys/dev/audio.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r fd516189a816 -r 28acc39006bc sys/dev/audio.c
--- a/sys/dev/audio.c Sun May 14 10:01:34 2017 +0000
+++ b/sys/dev/audio.c Sun May 14 10:08:49 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.344 2017/05/14 10:01:34 nat Exp $ */
+/* $NetBSD: audio.c,v 1.345 2017/05/14 10:08:49 nat Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.344 2017/05/14 10:01:34 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.345 2017/05/14 10:08:49 nat Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -3858,22 +3858,20 @@
cc = blksize - (inp - cb->s.start) % blksize;
if (sc->sc_writeme == false) {
DPRINTFN(3, ("MIX RING EMPTY - INSERT SILENCE\n"));
- mutex_exit(sc->sc_intr_lock);
audio_fill_silence(&vc->sc_mpr.s.param, inp, cc);
- mutex_enter(sc->sc_intr_lock);
sc->sc_pr.drops += cc;
} else
cc = blksize;
cb->s.inp = audio_stream_add_inp(&cb->s, cb->s.inp, cc);
cc = blksize;
cc1 = sc->sc_pr.s.end - sc->sc_pr.s.inp;
- mutex_exit(sc->sc_intr_lock);
if (cc1 < cc) {
audio_fill_silence(&vc->sc_mpr.s.param, sc->sc_pr.s.inp, cc1);
cc -= cc1;
audio_fill_silence(&vc->sc_mpr.s.param, sc->sc_pr.s.start, cc);
} else
audio_fill_silence(&vc->sc_mpr.s.param, sc->sc_pr.s.inp, cc);
+ mutex_exit(sc->sc_intr_lock);
kpreempt_disable();
if (sc->schedule_wih == true)
@@ -3957,12 +3955,14 @@
cc = blksize;
if (cb->s.inp + blksize > cb->s.end)
cc = cb->s.end - cb->s.inp;
+ mutex_enter(sc->sc_intr_lock);
memcpy(cb->s.inp, sc->sc_rr.s.start, cc);
if (cc < blksize && cc != 0) {
cc1 = cc;
cc = blksize - cc;
memcpy(cb->s.start, sc->sc_rr.s.start + cc1, cc);
}
+ mutex_exit(sc->sc_intr_lock);
cc = blksize;
recswvol_func(sc, cb, blksize, vc);
Home |
Main Index |
Thread Index |
Old Index