]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lockdep: Introduce lock_acquire_exclusive()/shared() helper macros
authorMichel Lespinasse <walken@google.com>
Mon, 8 Jul 2013 21:23:49 +0000 (14:23 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 12 Jul 2013 11:51:18 +0000 (13:51 +0200)
commita51805efae5dda0da66f79268ffcf0715f9dbea4
treea97a5193a8824fcea0aa7224258587b74e8940e0
parent1b375dc30710180c4b88cc59caba6e3481ec5c8b
lockdep: Introduce lock_acquire_exclusive()/shared() helper macros

In lockdep.h, the spinlock/mutex/rwsem/rwlock/lock_map acquire macros have
different definitions based on the value of CONFIG_PROVE_LOCKING.  We have
separate ifdefs for each of these definitions, which seems redundant.

Introduce lock_acquire_{exclusive,shared,shared_recursive} helpers which
will have different definitions based on CONFIG_PROVE_LOCKING.  Then all
other helper macros can be defined based on the above ones, which reduces
the amount of ifdefined code.

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20130708212350.6DD1931C15E@corp2gmr1-1.hot.corp.google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/lockdep.h