Lines Matching refs:owner

73 		atomic_long_read(&(sem)->owner), (long)current,	\
143 atomic_long_set(&sem->owner, (long)current); in rwsem_set_owner()
149 atomic_long_set(&sem->owner, 0); in rwsem_clear_owner()
157 return atomic_long_read(&sem->owner) & flags; in rwsem_test_oflags()
171 struct task_struct *owner) in __rwsem_set_reader_owned() argument
173 unsigned long val = (unsigned long)owner | RWSEM_READER_OWNED | in __rwsem_set_reader_owned()
174 (atomic_long_read(&sem->owner) & RWSEM_NONSPINNABLE); in __rwsem_set_reader_owned()
176 atomic_long_set(&sem->owner, val); in __rwsem_set_reader_owned()
210 unsigned long val = atomic_long_read(&sem->owner); in rwsem_clear_reader_owned()
213 if (atomic_long_try_cmpxchg(&sem->owner, &val, in rwsem_clear_reader_owned()
230 unsigned long owner = atomic_long_read(&sem->owner); in rwsem_set_nonspinnable() local
233 if (!(owner & RWSEM_READER_OWNED)) in rwsem_set_nonspinnable()
235 if (owner & RWSEM_NONSPINNABLE) in rwsem_set_nonspinnable()
237 } while (!atomic_long_try_cmpxchg(&sem->owner, &owner, in rwsem_set_nonspinnable()
238 owner | RWSEM_NONSPINNABLE)); in rwsem_set_nonspinnable()
274 (atomic_long_read(&sem->owner) & ~RWSEM_OWNER_FLAGS_MASK); in rwsem_owner()
284 unsigned long owner = atomic_long_read(&sem->owner); in rwsem_owner_flags() local
286 *pflags = owner & RWSEM_OWNER_FLAGS_MASK; in rwsem_owner_flags()
287 return (struct task_struct *)(owner & ~RWSEM_OWNER_FLAGS_MASK); in rwsem_owner_flags()
326 atomic_long_set(&sem->owner, 0L); in __init_rwsem()
455 struct task_struct *owner; in rwsem_mark_wake() local
482 owner = waiter->task; in rwsem_mark_wake()
483 __rwsem_set_reader_owned(sem, owner); in rwsem_mark_wake()
707 struct task_struct *owner; in rwsem_can_spin_on_owner() local
720 owner = rwsem_owner_flags(sem, &flags); in rwsem_can_spin_on_owner()
725 (owner && !(flags & RWSEM_READER_OWNED) && !owner_on_cpu(owner))) in rwsem_can_spin_on_owner()
735 rwsem_owner_state(struct task_struct *owner, unsigned long flags) in rwsem_owner_state() argument
743 return owner ? OWNER_WRITER : OWNER_NULL; in rwsem_owner_state()
749 struct task_struct *new, *owner; in rwsem_spin_on_owner() local
755 owner = rwsem_owner_flags(sem, &flags); in rwsem_spin_on_owner()
756 state = rwsem_owner_state(owner, flags); in rwsem_spin_on_owner()
768 if ((new != owner) || (new_flags != flags)) { in rwsem_spin_on_owner()
783 if (need_resched() || !owner_on_cpu(owner)) { in rwsem_spin_on_owner()
944 atomic_long_andnot(RWSEM_NONSPINNABLE, &sem->owner); in clear_nonspinnable()
1008 if ((atomic_long_read(&sem->owner) & RWSEM_READER_OWNED) && in rwsem_down_read_slowpath()
1501 struct task_struct *owner) in __rwsem_set_reader_owned() argument