mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
rtmutex: Confine deadlock logic to futex
The deadlock logic is only required for futexes. Remove the extra arguments for the public functions and also for the futex specific ones which get always called with deadlock detection enabled. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
1ca7b86062
commit
c051b21f71
4 changed files with 40 additions and 42 deletions
|
@ -1718,7 +1718,7 @@ retry_private:
|
|||
this->pi_state = pi_state;
|
||||
ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex,
|
||||
this->rt_waiter,
|
||||
this->task, 1);
|
||||
this->task);
|
||||
if (ret == 1) {
|
||||
/* We got the lock. */
|
||||
requeue_pi_wake_futex(this, &key2, hb2);
|
||||
|
@ -2337,9 +2337,9 @@ retry_private:
|
|||
/*
|
||||
* Block on the PI mutex:
|
||||
*/
|
||||
if (!trylock)
|
||||
ret = rt_mutex_timed_lock(&q.pi_state->pi_mutex, to, 1);
|
||||
else {
|
||||
if (!trylock) {
|
||||
ret = rt_mutex_timed_futex_lock(&q.pi_state->pi_mutex, to);
|
||||
} else {
|
||||
ret = rt_mutex_trylock(&q.pi_state->pi_mutex);
|
||||
/* Fixup the trylock return value: */
|
||||
ret = ret ? 0 : -EWOULDBLOCK;
|
||||
|
@ -2669,7 +2669,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
|
|||
*/
|
||||
WARN_ON(!q.pi_state);
|
||||
pi_mutex = &q.pi_state->pi_mutex;
|
||||
ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1);
|
||||
ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter);
|
||||
debug_rt_mutex_free_waiter(&rt_waiter);
|
||||
|
||||
spin_lock(q.lock_ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue