mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Cc: Peter Zijlstra <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Cc: Lai Jiangshan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
1 parent
c051b21f71
commit
8930ed80f9
5 files changed
+83
-28
No files matched your search
@@ -20,14 +20,15 @@ extern void debug_rt_mutex_unlock(struct rt_mutex *lock);
|
||||
extern void debug_rt_mutex_proxy_lock(struct rt_mutex *lock,
|
||||
struct task_struct *powner);
|
||||
extern void debug_rt_mutex_proxy_unlock(struct rt_mutex *lock);
|
||||
extern void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *waiter,
|
||||
extern void debug_rt_mutex_deadlock(enum rtmutex_chainwalk chwalk,
|
||||
struct rt_mutex_waiter *waiter,
|
||||
struct rt_mutex *lock);
|
||||
extern void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter);
|
||||
# define debug_rt_mutex_reset_waiter(w) \
|
||||
do { (w)->deadlock_lock = NULL; } while (0)
|
||||
|
||||
static inline int debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *waiter,
|
||||
int detect)
|
||||
static inline bool debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *waiter,
|
||||
enum rtmutex_chainwalk walk)
|
||||
{
|
||||
return (waiter != NULL);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user