Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Broadcast all conditional variables if in being deac...



details:   https://anonhg.NetBSD.org/src/rev/5a619024b712
branches:  trunk
changeset: 354834:5a619024b712
user:      nat <nat%NetBSD.org@localhost>
date:      Sat Jul 01 05:44:52 2017 +0000

description:
Broadcast all conditional variables if in being deactivated so no readers
or writers get stuck.

diffstat:

 sys/dev/audio.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 5a74d04dadf0 -r 5a619024b712 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Jul 01 05:32:24 2017 +0000
+++ b/sys/dev/audio.c   Sat Jul 01 05:44:52 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.366 2017/06/25 10:28:22 nat Exp $  */
+/*     $NetBSD: audio.c,v 1.367 2017/07/01 05:44:52 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.366 2017/06/25 10:28:22 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.367 2017/07/01 05:44:52 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -897,6 +897,10 @@
                sc->sc_dying = true;
                mutex_enter(sc->sc_intr_lock);
                cv_broadcast(&sc->sc_condvar);
+               cv_broadcast(&sc->sc_rcondvar);
+               cv_broadcast(&sc->sc_wchan);
+               cv_broadcast(&sc->sc_rchan);
+               cv_broadcast(&sc->sc_lchan);
                mutex_exit(sc->sc_intr_lock);
                mutex_exit(sc->sc_lock);
                return 0;



Home | Main Index | Thread Index | Old Index