Lines Matching refs:owner
93 rt_mutex_owner_encode(struct rt_mutex_base *lock, struct task_struct *owner) in rt_mutex_owner_encode() argument
95 unsigned long val = (unsigned long)owner; in rt_mutex_owner_encode()
104 rt_mutex_set_owner(struct rt_mutex_base *lock, struct task_struct *owner) in rt_mutex_set_owner() argument
110 xchg_acquire(&lock->owner, rt_mutex_owner_encode(lock, owner)); in rt_mutex_set_owner()
116 WRITE_ONCE(lock->owner, rt_mutex_owner_encode(lock, NULL)); in rt_mutex_clear_owner()
121 lock->owner = (struct task_struct *) in clear_rt_mutex_waiters()
122 ((unsigned long)lock->owner & ~RT_MUTEX_HAS_WAITERS); in clear_rt_mutex_waiters()
128 unsigned long owner, *p = (unsigned long *) &lock->owner; in fixup_rt_mutex_waiters() local
191 owner = READ_ONCE(*p); in fixup_rt_mutex_waiters()
192 if (owner & RT_MUTEX_HAS_WAITERS) { in fixup_rt_mutex_waiters()
203 xchg_acquire(p, owner & ~RT_MUTEX_HAS_WAITERS); in fixup_rt_mutex_waiters()
205 WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS); in fixup_rt_mutex_waiters()
218 return try_cmpxchg_acquire(&lock->owner, &old, new); in rt_mutex_cmpxchg_acquire()
225 return try_cmpxchg_release(&lock->owner, &old, new); in rt_mutex_cmpxchg_release()
235 unsigned long owner, *p = (unsigned long *) &lock->owner; in mark_rt_mutex_waiters() local
238 owner = *p; in mark_rt_mutex_waiters()
239 } while (cmpxchg_relaxed(p, owner, in mark_rt_mutex_waiters()
240 owner | RT_MUTEX_HAS_WAITERS) != owner); in mark_rt_mutex_waiters()
260 struct task_struct *owner = rt_mutex_owner(lock); in unlock_rt_mutex_safe() local
288 return rt_mutex_cmpxchg_release(lock, owner, NULL); in unlock_rt_mutex_safe()
309 lock->owner = (struct task_struct *) in mark_rt_mutex_waiters()
310 ((unsigned long)lock->owner | RT_MUTEX_HAS_WAITERS); in mark_rt_mutex_waiters()
320 lock->owner = NULL; in unlock_rt_mutex_safe()
1186 struct task_struct *owner = rt_mutex_owner(lock); in task_blocks_on_rt_mutex() local
1205 if (owner == task && !(build_ww_mutex() && ww_ctx)) in task_blocks_on_rt_mutex()
1238 if (!owner) in task_blocks_on_rt_mutex()
1241 raw_spin_lock(&owner->pi_lock); in task_blocks_on_rt_mutex()
1243 rt_mutex_dequeue_pi(owner, top_waiter); in task_blocks_on_rt_mutex()
1244 rt_mutex_enqueue_pi(owner, waiter); in task_blocks_on_rt_mutex()
1246 rt_mutex_adjust_prio(lock, owner); in task_blocks_on_rt_mutex()
1247 if (owner->pi_blocked_on) in task_blocks_on_rt_mutex()
1254 next_lock = task_blocked_on_lock(owner); in task_blocks_on_rt_mutex()
1256 raw_spin_unlock(&owner->pi_lock); in task_blocks_on_rt_mutex()
1270 get_task_struct(owner); in task_blocks_on_rt_mutex()
1274 res = rt_mutex_adjust_prio_chain(owner, chwalk, lock, in task_blocks_on_rt_mutex()
1317 lock->owner = (void *) RT_MUTEX_HAS_WAITERS; in mark_wakeup_next_waiter()
1459 struct task_struct *owner) in rtmutex_spin_on_owner() argument
1466 if (owner != rt_mutex_owner(lock)) in rtmutex_spin_on_owner()
1483 if (!owner_on_cpu(owner) || need_resched() || in rtmutex_spin_on_owner()
1496 struct task_struct *owner) in rtmutex_spin_on_owner() argument
1519 struct task_struct *owner = rt_mutex_owner(lock); in remove_waiter() local
1533 if (!owner || !is_top_waiter) in remove_waiter()
1536 raw_spin_lock(&owner->pi_lock); in remove_waiter()
1538 rt_mutex_dequeue_pi(owner, waiter); in remove_waiter()
1541 rt_mutex_enqueue_pi(owner, rt_mutex_top_waiter(lock)); in remove_waiter()
1543 rt_mutex_adjust_prio(lock, owner); in remove_waiter()
1546 next_lock = task_blocked_on_lock(owner); in remove_waiter()
1548 raw_spin_unlock(&owner->pi_lock); in remove_waiter()
1558 get_task_struct(owner); in remove_waiter()
1562 rt_mutex_adjust_prio_chain(owner, RT_MUTEX_MIN_CHAINWALK, lock, in remove_waiter()
1586 struct task_struct *owner; in rt_mutex_slowlock_block() local
1610 owner = rt_mutex_owner(lock); in rt_mutex_slowlock_block()
1612 owner = NULL; in rt_mutex_slowlock_block()
1615 if (!owner || !rtmutex_spin_on_owner(lock, waiter, owner)) in rt_mutex_slowlock_block()
1777 struct task_struct *owner; in rtlock_slowlock_locked() local
1799 owner = rt_mutex_owner(lock); in rtlock_slowlock_locked()
1801 owner = NULL; in rtlock_slowlock_locked()
1804 if (!owner || !rtmutex_spin_on_owner(lock, &waiter, owner)) in rtlock_slowlock_locked()