diff options
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_acctrace.c | 15 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_acctrace.h | 4 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 8 |
3 files changed, 17 insertions, 10 deletions
diff --git a/sys/dev/raidframe/rf_acctrace.c b/sys/dev/raidframe/rf_acctrace.c index c3eb173bcce..4ce82a007cc 100644 --- a/sys/dev/raidframe/rf_acctrace.c +++ b/sys/dev/raidframe/rf_acctrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_acctrace.c,v 1.23 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_acctrace.c,v 1.24 2011/05/01 06:22:54 mrg Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_acctrace.c,v 1.23 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_acctrace.c,v 1.24 2011/05/01 06:22:54 mrg Exp $"); #include <sys/stat.h> #include <sys/types.h> @@ -52,13 +52,20 @@ __KERNEL_RCSID(0, "$NetBSD: rf_acctrace.c,v 1.23 2006/11/16 01:33:23 christos Ex #if RF_ACC_TRACE > 0 static long numTracesSoFar; -RF_DECLARE_MUTEX(rf_tracing_mutex) +rf_declare_mutex2(rf_tracing_mutex); + +static void +rf_ShutdownAccessTrace(void *unused) +{ + rf_destroy_mutex2(rf_tracing_mutex); +} int rf_ConfigureAccessTrace(RF_ShutdownList_t **listp) { numTracesSoFar = 0; - rf_mutex_init(&rf_tracing_mutex); + rf_init_mutex2(rf_tracing_mutex, IPL_VM); + rf_ShutdownCreate(listp, rf_ShutdownAccessTrace, NULL); return (0); } diff --git a/sys/dev/raidframe/rf_acctrace.h b/sys/dev/raidframe/rf_acctrace.h index 29eaa09e9c5..adfbcca8408 100644 --- a/sys/dev/raidframe/rf_acctrace.h +++ b/sys/dev/raidframe/rf_acctrace.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_acctrace.h,v 1.9 2011/04/27 07:55:14 mrg Exp $ */ +/* $NetBSD: rf_acctrace.h,v 1.10 2011/05/01 06:22:54 mrg Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -123,7 +123,7 @@ typedef struct RF_AccTotals_s { RF_Hist_t tot_hist[RF_HIST_NUM_BUCKETS]; } RF_AccTotals_t; -extern RF_DECLARE_MUTEX(rf_tracing_mutex); +extern rf_declare_mutex2(rf_tracing_mutex); int rf_ConfigureAccessTrace(RF_ShutdownList_t ** listp); diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index e389f0c8acb..91e8b751845 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.287 2011/05/01 05:44:47 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.288 2011/05/01 06:22:54 mrg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.287 2011/05/01 05:44:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.288 2011/05/01 06:22:54 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -2175,11 +2175,11 @@ KernelWakeupFunc(struct buf *bp) if (req->tracerec) { RF_ETIMER_STOP(req->tracerec->timer); RF_ETIMER_EVAL(req->tracerec->timer); - RF_LOCK_MUTEX(rf_tracing_mutex); + rf_lock_mutex2(rf_tracing_mutex); req->tracerec->diskwait_us += RF_ETIMER_VAL_US(req->tracerec->timer); req->tracerec->phys_io_us += RF_ETIMER_VAL_US(req->tracerec->timer); req->tracerec->num_phys_ios++; - RF_UNLOCK_MUTEX(rf_tracing_mutex); + rf_unlock_mutex2(rf_tracing_mutex); } #endif |
