aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mutex-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mutex-debug.h')
-rw-r--r--include/linux/mutex-debug.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/mutex-debug.h b/include/linux/mutex-debug.h
new file mode 100644
index 00000000..731d77d6
--- /dev/null
+++ b/include/linux/mutex-debug.h
@@ -0,0 +1,23 @@
+#ifndef __LINUX_MUTEX_DEBUG_H
+#define __LINUX_MUTEX_DEBUG_H
+
+#include <linux/linkage.h>
+#include <linux/lockdep.h>
+
+/*
+ * Mutexes - debugging helpers:
+ */
+
+#define __DEBUG_MUTEX_INITIALIZER(lockname) \
+ , .magic = &lockname
+
+#define mutex_init(mutex) \
+do { \
+ static struct lock_class_key __key; \
+ \
+ __mutex_init((mutex), #mutex, &__key); \
+} while (0)
+
+extern void mutex_destroy(struct mutex *lock);
+
+#endif