Lines Matching refs:ret
208 int ret; in attach_to_pi_state() local
304 ret = -EINVAL; in attach_to_pi_state()
308 ret = -EAGAIN; in attach_to_pi_state()
312 ret = -EFAULT; in attach_to_pi_state()
317 return ret; in attach_to_pi_state()
447 int ret = handle_exit_race(uaddr, uval, p); in attach_to_pi_owner() local
459 if (ret == -EBUSY) in attach_to_pi_owner()
463 return ret; in attach_to_pi_owner()
523 int ret; in futex_lock_pi_atomic() local
570 ret = lock_pi_update_atomic(uaddr, uval, newval); in futex_lock_pi_atomic()
571 if (ret) in futex_lock_pi_atomic()
572 return ret; in futex_lock_pi_atomic()
599 ret = lock_pi_update_atomic(uaddr, uval, newval); in futex_lock_pi_atomic()
600 if (ret) in futex_lock_pi_atomic()
601 return ret; in futex_lock_pi_atomic()
620 int ret = 0; in wake_futex_pi() local
632 ret = -EAGAIN; in wake_futex_pi()
646 ret = -EFAULT; in wake_futex_pi()
650 ret = futex_cmpxchg_value_locked(&curval, uaddr, uval, newval); in wake_futex_pi()
651 if (!ret && (curval != uval)) { in wake_futex_pi()
659 ret = -EAGAIN; in wake_futex_pi()
661 ret = -EINVAL; in wake_futex_pi()
664 if (!ret) { in wake_futex_pi()
680 return ret; in wake_futex_pi()
859 int ret; in fixup_pi_state_owner() local
864 ret = __fixup_pi_state_owner(uaddr, q, argowner); in fixup_pi_state_owner()
866 return ret; in fixup_pi_state_owner()
937 int res, ret; in futex_lock_pi() local
948 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q.key, FUTEX_WRITE); in futex_lock_pi()
949 if (unlikely(ret != 0)) in futex_lock_pi()
955 ret = futex_lock_pi_atomic(uaddr, hb, &q.key, &q.pi_state, current, in futex_lock_pi()
957 if (unlikely(ret)) { in futex_lock_pi()
962 switch (ret) { in futex_lock_pi()
965 ret = 0; in futex_lock_pi()
983 wait_for_owner_exiting(ret, exiting); in futex_lock_pi()
999 ret = rt_mutex_futex_trylock(&q.pi_state->pi_mutex); in futex_lock_pi()
1001 ret = ret ? 0 : -EWOULDBLOCK; in futex_lock_pi()
1027 ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current); in futex_lock_pi()
1030 if (ret) { in futex_lock_pi()
1031 if (ret == 1) in futex_lock_pi()
1032 ret = 0; in futex_lock_pi()
1039 ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); in futex_lock_pi()
1052 if (ret && !rt_mutex_cleanup_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter)) in futex_lock_pi()
1053 ret = 0; in futex_lock_pi()
1060 res = fixup_pi_owner(uaddr, &q, !ret); in futex_lock_pi()
1066 ret = (res < 0) ? res : 0; in futex_lock_pi()
1080 return ret != -EINTR ? ret : -ERESTARTNOINTR; in futex_lock_pi()
1085 ret = fault_in_user_writeable(uaddr); in futex_lock_pi()
1086 if (ret) in futex_lock_pi()
1106 int ret; in futex_unlock_pi() local
1120 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, FUTEX_WRITE); in futex_unlock_pi()
1121 if (ret) in futex_unlock_pi()
1122 return ret; in futex_unlock_pi()
1136 ret = -EINVAL; in futex_unlock_pi()
1162 ret = wake_futex_pi(uaddr, uval, pi_state); in futex_unlock_pi()
1169 if (!ret) in futex_unlock_pi()
1170 return ret; in futex_unlock_pi()
1175 if (ret == -EFAULT) in futex_unlock_pi()
1181 if (ret == -EAGAIN) in futex_unlock_pi()
1187 return ret; in futex_unlock_pi()
1197 if ((ret = futex_cmpxchg_value_locked(&curval, uaddr, uval, 0))) { in futex_unlock_pi()
1199 switch (ret) { in futex_unlock_pi()
1208 return ret; in futex_unlock_pi()
1215 ret = (curval == uval) ? 0 : -EAGAIN; in futex_unlock_pi()
1219 return ret; in futex_unlock_pi()
1227 ret = fault_in_user_writeable(uaddr); in futex_unlock_pi()
1228 if (!ret) in futex_unlock_pi()
1231 return ret; in futex_unlock_pi()