Merge tag 'xfs-for-linus-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / include / linux / mutex-debug.h
CommitLineData
408894ee
IM
1#ifndef __LINUX_MUTEX_DEBUG_H
2#define __LINUX_MUTEX_DEBUG_H
3
8b4ad5e3 4#include <linux/linkage.h>
ef5d4707 5#include <linux/lockdep.h>
040a0a37 6#include <linux/debug_locks.h>
8b4ad5e3 7
408894ee
IM
8/*
9 * Mutexes - debugging helpers:
10 */
11
9a11b49a
IM
12#define __DEBUG_MUTEX_INITIALIZER(lockname) \
13 , .magic = &lockname
408894ee 14
ef5d4707
IM
15#define mutex_init(mutex) \
16do { \
17 static struct lock_class_key __key; \
18 \
19 __mutex_init((mutex), #mutex, &__key); \
20} while (0)
408894ee 21
b3c97528 22extern void mutex_destroy(struct mutex *lock);
408894ee 23
408894ee 24#endif