diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-05-22 07:25:47 +0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-06-22 00:05:30 +0400 |
commit | 8930ed80f970a90a795239e7415c9b0e6f964649 (patch) | |
tree | 10463885f150543faaaf621e7ff85bbe6a81c911 /kernel/locking/rtmutex.h | |
parent | c051b21f71d1ffdfd7ad406a1ef5ede5e5f974c5 (diff) | |
download | linux-8930ed80f970a90a795239e7415c9b0e6f964649.tar.xz |
rtmutex: Cleanup deadlock detector debug logic
The conditions under which deadlock detection is conducted are unclear
and undocumented.
Add constants instead of using 0/1 and provide a selection function
which hides the additional debug dependency from the calling code.
Add comments where needed.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/20140522031949.947264874@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/locking/rtmutex.h')
-rw-r--r-- | kernel/locking/rtmutex.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/locking/rtmutex.h b/kernel/locking/rtmutex.h index f6a1f3c133b1..c4060584c407 100644 --- a/kernel/locking/rtmutex.h +++ b/kernel/locking/rtmutex.h @@ -22,10 +22,15 @@ #define debug_rt_mutex_init(m, n) do { } while (0) #define debug_rt_mutex_deadlock(d, a ,l) do { } while (0) #define debug_rt_mutex_print_deadlock(w) do { } while (0) -#define debug_rt_mutex_detect_deadlock(w,d) (d) #define debug_rt_mutex_reset_waiter(w) do { } while (0) static inline void rt_mutex_print_deadlock(struct rt_mutex_waiter *w) { WARN(1, "rtmutex deadlock detected\n"); } + +static inline bool debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *w, + enum rtmutex_chainwalk walk) +{ + return walk == RT_MUTEX_FULL_CHAINWALK; +} |