swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Raw File
Tip revision: 0d4cbb5e7f60b2f1a4d8b7f6ea4cc264262c7a01 authored by Linus Torvalds on 11 September 2007, 02:49:55 UTC
Linux 2.6.23-rc6
Tip revision: 0d4cbb5
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 FASTCALL(mutex_destroy(struct mutex *lock));

#endif
back to top