2024-09-09 08:52:07 +00:00
|
|
|
#ifndef __LINUX_MUTEX_DEBUG_H
|
|
|
|
#define __LINUX_MUTEX_DEBUG_H
|
|
|
|
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/lockdep.h>
|
2024-09-09 08:57:42 +00:00
|
|
|
#include <linux/debug_locks.h>
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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
|