https://github.com/torvalds/linux
Raw File
Tip revision: 60d4684068ff1eec78f55b5888d0bd2d4cca1520 authored by Linus Torvalds on 28 August 2006, 03:41:48 UTC
Linux v2.6.18-rc5
Tip revision: 60d4684
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