Exemple #1
0
/*
 * Slow path to release a rt-mutex:
 */
static void __sched
rt_mutex_slowunlock(struct rt_mutex *lock)
{
	raw_spin_lock(&lock->wait_lock);

	debug_rt_mutex_unlock(lock);

	rt_mutex_deadlock_account_unlock(current);

	if (!rt_mutex_has_waiters(lock)) {
		lock->owner = NULL;
		raw_spin_unlock(&lock->wait_lock);
		return;
	}

	wakeup_next_waiter(lock);

	raw_spin_unlock(&lock->wait_lock);

	/* Undo pi boosting if necessary: */
	rt_mutex_adjust_prio(current);
}
Exemple #2
0
/*
 * Slow path to release a rt_mutex spin_lock style
 */
static void fastcall noinline __sched
rt_spin_lock_slowunlock(struct rt_mutex *lock)
{
	unsigned long flags;

	spin_lock_irqsave(&lock->wait_lock, flags);

	debug_rt_mutex_unlock(lock);

	rt_mutex_deadlock_account_unlock(current);

	if (!rt_mutex_has_waiters(lock)) {
		lock->owner = NULL;
		spin_unlock_irqrestore(&lock->wait_lock, flags);
		return;
	}

	wakeup_next_waiter(lock, 1);

	spin_unlock_irqrestore(&lock->wait_lock, flags);

	/* Undo pi boosting.when necessary */
	rt_mutex_adjust_prio(current);
}