summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_map.c
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2011-05-11 18:13:12 +0000
committermrg <mrg@NetBSD.org>2011-05-11 18:13:12 +0000
commit5e1b9a4c81acf07afe2e53eb156bb859a76a95ee (patch)
tree61b84f47648dd3b4190a212bbad2e324d653ecc9 /sys/dev/raidframe/rf_map.c
parentaad8c4ad3b56bf3ca9f708d4e111f2932fee7b06 (diff)
convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond. convert all remaining simple_lock's to kmutexes (they're not used or compiled right now... even with all options enabled) and remove the support for them. this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
Diffstat (limited to 'sys/dev/raidframe/rf_map.c')
-rw-r--r--sys/dev/raidframe/rf_map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/raidframe/rf_map.c b/sys/dev/raidframe/rf_map.c
index 5586a6f5714..bf7571506cf 100644
--- a/sys/dev/raidframe/rf_map.c
+++ b/sys/dev/raidframe/rf_map.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_map.c,v 1.44 2009/03/15 17:17:23 cegger Exp $ */
+/* $NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
**************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.44 2009/03/15 17:17:23 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -632,9 +632,9 @@ rf_CheckStripeForFailures(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap)
RF_SectorNum_t diskOffset, poffset;
/* quick out in the fault-free case. */
- RF_LOCK_MUTEX(raidPtr->mutex);
+ rf_lock_mutex2(raidPtr->mutex);
numFailures = raidPtr->numFailures;
- RF_UNLOCK_MUTEX(raidPtr->mutex);
+ rf_unlock_mutex2(raidPtr->mutex);
if (numFailures == 0)
return (0);
@@ -683,9 +683,9 @@ rf_NumFailedDataUnitsInStripe(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap)
int numFailures;
/* quick out in the fault-free case. */
- RF_LOCK_MUTEX(raidPtr->mutex);
+ rf_lock_mutex2(raidPtr->mutex);
numFailures = raidPtr->numFailures;
- RF_UNLOCK_MUTEX(raidPtr->mutex);
+ rf_unlock_mutex2(raidPtr->mutex);
if (numFailures == 0)
return (0);
numFailures = 0;