Blame view

include/linux/mutex-debug.h 442 Bytes
408894ee4   Ingo Molnar   [PATCH] mutex sub...
1
2
  #ifndef __LINUX_MUTEX_DEBUG_H
  #define __LINUX_MUTEX_DEBUG_H
8b4ad5e3f   David S. Miller   [MUTEX]: linux/mu...
3
  #include <linux/linkage.h>
ef5d4707b   Ingo Molnar   [PATCH] lockdep: ...
4
  #include <linux/lockdep.h>
8b4ad5e3f   David S. Miller   [MUTEX]: linux/mu...
5

408894ee4   Ingo Molnar   [PATCH] mutex sub...
6
7
8
  /*
   * Mutexes - debugging helpers:
   */
9a11b49a8   Ingo Molnar   [PATCH] lockdep: ...
9
10
  #define __DEBUG_MUTEX_INITIALIZER(lockname)				\
  	, .magic = &lockname
408894ee4   Ingo Molnar   [PATCH] mutex sub...
11

ef5d4707b   Ingo Molnar   [PATCH] lockdep: ...
12
13
14
15
16
17
  #define mutex_init(mutex)						\
  do {									\
  	static struct lock_class_key __key;				\
  									\
  	__mutex_init((mutex), #mutex, &__key);				\
  } while (0)
408894ee4   Ingo Molnar   [PATCH] mutex sub...
18

b3c975286   Harvey Harrison   include/linux: Re...
19
  extern void mutex_destroy(struct mutex *lock);
408894ee4   Ingo Molnar   [PATCH] mutex sub...
20

408894ee4   Ingo Molnar   [PATCH] mutex sub...
21
  #endif