https://github.com/torvalds/linux
Raw File
Tip revision: 22763c5cf3690a681551162c15d34d935308c8d7 authored by Linus Torvalds on 03 December 2009, 03:51:21 UTC
Linux 2.6.32
Tip revision: 22763c5
mutex-debug.h
#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
back to top