Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev On a forcefull detach wait for spkr to close as the ...
details: https://anonhg.NetBSD.org/src/rev/9ff2b5446f0b
branches: trunk
changeset: 354854:9ff2b5446f0b
user: nat <nat%NetBSD.org@localhost>
date: Sat Jul 01 23:27:17 2017 +0000
description:
On a forcefull detach wait for spkr to close as the detach has to
succeed.
Ok christos@.
diffstat:
sys/dev/spkr.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 399f1a5d59d0 -r 9ff2b5446f0b sys/dev/spkr.c
--- a/sys/dev/spkr.c Sat Jul 01 23:12:08 2017 +0000
+++ b/sys/dev/spkr.c Sat Jul 01 23:27:17 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr.c,v 1.13 2017/06/14 06:55:37 nat Exp $ */
+/* $NetBSD: spkr.c,v 1.14 2017/07/01 23:27:17 nat Exp $ */
/*
* Copyright (c) 1990 Eric S. Raymond (esr%snark.thyrsus.com@localhost)
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.13 2017/06/14 06:55:37 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.14 2017/07/01 23:27:17 nat Exp $");
#if defined(_KERNEL_OPT)
#include "wsmux.h"
@@ -388,6 +388,10 @@
#endif /* SPKRDEBUG */
if (sc == NULL)
return ENXIO;
+
+ /* XXXNS If speaker never closes, we cannot complete the detach. */
+ while ((flags & DETACH_FORCE) != 0 && sc->sc_inbuf != NULL)
+ kpause("spkrwait", TRUE, 1, NULL);
if (sc->sc_inbuf != NULL)
return EBUSY;
Home |
Main Index |
Thread Index |
Old Index