mutex_init: make MUTEX_DEFAULT + IPL_SOFT* return an adaptive mutex.

This commit is contained in:
ad 2007-12-05 06:50:07 +00:00
parent e1b5d7773c
commit b21038696d

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_mutex.c,v 1.24 2007/11/30 23:05:43 ad Exp $ */
/* $NetBSD: kern_mutex.c,v 1.25 2007/12/05 06:50:07 ad Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
#define __MUTEX_PRIVATE
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.24 2007/11/30 23:05:43 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.25 2007/12/05 06:50:07 ad Exp $");
#include "opt_multiprocessor.h"
@ -335,6 +335,10 @@ mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl)
case MUTEX_DRIVER:
switch (ipl) {
case IPL_NONE:
case IPL_SOFTCLOCK:
case IPL_SOFTBIO:
case IPL_SOFTNET:
case IPL_SOFTSERIAL:
type = MUTEX_ADAPTIVE;
break;
default: