summaryrefslogtreecommitdiffstats
path: root/include/sys/mutex.h
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-06 23:19:27 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-06 23:19:27 +0000
commit4f86a887d88ef2d28fb14a020f91e0cd8757ed21 (patch)
treea365bd6f0742c9ac819ae6f12baf76dfa4db37d7 /include/sys/mutex.h
parente8b31e84825d14d98930f165707687fad961b88a (diff)
Remaining issues fixed after reenabled mutex debugging.
- Ensure the mutex_stats_sem and mutex_stats_list are initialized - Only spin if you have to in mutex_init git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@97 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'include/sys/mutex.h')
-rw-r--r--include/sys/mutex.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/sys/mutex.h b/include/sys/mutex.h
index dc78edbbc..23c23409b 100644
--- a/include/sys/mutex.h
+++ b/include/sys/mutex.h
@@ -10,8 +10,7 @@ extern "C" {
#include <sys/types.h>
#include <sys/kmem.h>
-//#define DEBUG_MUTEX
-#undef DEBUG_MUTEX
+#define DEBUG_MUTEX
#define MUTEX_DEFAULT 0
#define MUTEX_SPIN 1
@@ -45,7 +44,7 @@ extern int mutex_spin_max;
#ifdef DEBUG_MUTEX
extern int mutex_stats[MUTEX_STATS_SIZE];
-extern struct mutex mutex_stats_lock;
+extern struct rw_semaphore mutex_stats_sem;
extern struct list_head mutex_stats_list;
#define MUTEX_STAT_INC(stats, stat) ((stats)[stat]++)
#else