/* We fill out the fields in the waiter to store the information about the deadlock. We print when we return. act_waiter can be NULL in case of a remove waiter operation.  */
void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *act_waiter, struct rt_mutex *lock)
/* We fill out the fields in the waiter to store the information about the deadlock. We print when we return. act_waiter can be NULL in case of a remove waiter operation.  */
void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *act_waiter, struct rt_mutex *lock)
{
	struct task_struct *task;
	if (!rt_trace_on || detect || !act_waiter)
		return;
	task = rt_mutex_owner(act_waiter->lock);
	if (task && task != current) {
		act_waiter->deadlock_task_pid = get_pid(task_pid(task));
		act_waiter->deadlock_lock = lock;
	}
}