diff options
author | Byungchul Park <[email protected]> | 2017-10-25 17:55:58 +0900 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-10-25 12:19:00 +0200 |
commit | 6f0397d7e100f3b3978d6ebb6b2dea29ee7c4a95 (patch) | |
tree | 3ba81e38c591efdfcff2b4cdd91b1fdbb22701a8 | |
parent | 65e53aab6d54385dea799356defcbdcc456fb1a7 (diff) |
locking/lockdep: Provide empty lockdep_map structure for !CONFIG_LOCKDEP
After this patch the lockdep_map structure takes no space if lockdep is
disabled, reducing the number of #ifdefs in unrelated kernel code.
Signed-off-by: Byungchul Park <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | include/linux/lockdep.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index bfa8e0b0d6f1..b6662d05bcda 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -527,6 +527,11 @@ static inline void lockdep_on(void) */ struct lock_class_key { }; +/* + * The lockdep_map takes no space if lockdep is disabled: + */ +struct lockdep_map { }; + #define lockdep_depth(tsk) (0) #define lockdep_is_held_type(l, r) (1) |