Source-Changes-HG archive

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

[src/trunk]: src/sys/dev An adaptive mutex is sufficient, the data structures...



details:   https://anonhg.NetBSD.org/src/rev/0e16999e6593
branches:  trunk
changeset: 340104:0e16999e6593
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Aug 23 07:47:52 2015 +0000

description:
An adaptive mutex is sufficient, the data structures are accessed
by regular threads and by the biodone softint.

This allows diskstart routines to sleep (like cgd).

diffstat:

 sys/dev/dksubr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b4effbfdcbad -r 0e16999e6593 sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Sun Aug 23 07:15:16 2015 +0000
+++ b/sys/dev/dksubr.c  Sun Aug 23 07:47:52 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.72 2015/08/18 21:26:16 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.73 2015/08/23 07:47:52 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.72 2015/08/18 21:26:16 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.73 2015/08/23 07:47:52 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,7 +90,7 @@
 void
 dk_attach(struct dk_softc *dksc)
 {
-       mutex_init(&dksc->sc_iolock, MUTEX_DEFAULT, IPL_VM);
+       mutex_init(&dksc->sc_iolock, MUTEX_DEFAULT, IPL_NONE);
        dksc->sc_flags |= DKF_INITED;
 #ifdef DIAGNOSTIC
        dksc->sc_flags |= DKF_WARNLABEL | DKF_LABELSANITY;



Home | Main Index | Thread Index | Old Index