blob: 2537285e10641de6ae4a5d51170912860aff03e2 [file] [log] [blame]
Ingo Molnar408894e2006-01-09 15:59:20 -08001#ifndef __LINUX_MUTEX_DEBUG_H
2#define __LINUX_MUTEX_DEBUG_H
3
David S. Miller8b4ad5e2006-01-09 21:38:23 -08004#include <linux/linkage.h>
Ingo Molnaref5d4702006-07-03 00:24:55 -07005#include <linux/lockdep.h>
David S. Miller8b4ad5e2006-01-09 21:38:23 -08006
Ingo Molnar408894e2006-01-09 15:59:20 -08007/*
8 * Mutexes - debugging helpers:
9 */
10
Ingo Molnar9a11b49a2006-07-03 00:24:33 -070011#define __DEBUG_MUTEX_INITIALIZER(lockname) \
12 , .magic = &lockname
Ingo Molnar408894e2006-01-09 15:59:20 -080013
Ingo Molnaref5d4702006-07-03 00:24:55 -070014#define mutex_init(mutex) \
15do { \
16 static struct lock_class_key __key; \
17 \
18 __mutex_init((mutex), #mutex, &__key); \
19} while (0)
Ingo Molnar408894e2006-01-09 15:59:20 -080020
21extern void FASTCALL(mutex_destroy(struct mutex *lock));
22
Ingo Molnar408894e2006-01-09 15:59:20 -080023#endif