From 851a67b825540a8e00c0be3ee25e4627ba8b133b Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Thu, 11 Oct 2007 22:11:12 +0200 Subject: lockdep: annotate rcu_read_{,un}lock{,_bh} lockdep annotate rcu_read_{,un}lock{,_bh} in order to catch imbalanced usage. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: Paul E. McKenney --- include/linux/lockdep.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/lockdep.h') diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 9dc46db2985e..f6279f68a827 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -252,6 +252,13 @@ extern void lockdep_on(void); extern void lockdep_init_map(struct lockdep_map *lock, const char *name, struct lock_class_key *key, int subclass); +/* + * To initialize a lockdep_map statically use this macro. + * Note that _name must not be NULL. + */ +#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ + { .name = (_name), .key = (void *)(_key), } + /* * Reinitialize a lock key - for cases where there is special locking or * special initialization of locks so that the validator gets the scope -- cgit v1.2.3-59-g8ed1b