void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter)
{
	SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock));
	DEBUG_LOCKS_WARN_ON(list_empty(&lock->wait_list));
	DEBUG_LOCKS_WARN_ON(waiter->magic != waiter);
	DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list));
}
void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
			    struct thread_info *ti)
{
	SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock));

	/* Mark the current thread as blocked on the lock: */
	ti->task->blocked_on = waiter;
}
示例#3
0
void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
			    struct thread_info *ti)
{
	SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock));

	
	ti->task->blocked_on = waiter;
}
void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
			    struct thread_info *ti)
{
	SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock));

	/* Mark the current thread as blocked on the lock: */
	ti->task->blocked_on = waiter;
#ifdef CONFIG_MT_DEBUG_MUTEXES
    waiter->task_wait_on = lock->owner;
#endif
}
void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter)
{
	SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock));
    if(DEBUG_LOCKS_WARN_ON(list_empty(&lock->wait_list))){
        printk("[MUTEX WARN!!]\n");
    }
    if(DEBUG_LOCKS_WARN_ON(waiter->magic != waiter)){
        printk("[MUTEX WARN!!] bad magic number %p:%p\n", waiter->magic, waiter);
    }
    if(DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list))){
        printk("[MUTEX WARN!!] empt waiter list\n");
    }
}