Lines Matching refs:val

47 __lll_abstimed_wait (void *ptr, int val,  in __lll_abstimed_wait()  argument
54 return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait (ptr, val, mlsec, flags); in __lll_abstimed_wait()
58 __lll_abstimed_wait_intr (void *ptr, int val, in __lll_abstimed_wait_intr() argument
65 return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait_intr (ptr, val, mlsec, flags); in __lll_abstimed_wait_intr()
128 unsigned int val; in __lll_robust_lock() local
134 val = *iptr; in __lll_robust_lock()
135 if (!val && atomic_compare_and_exchange_bool_acq (iptr, id, 0) == 0) in __lll_robust_lock()
138 val | LLL_WAITERS, val) == 0) in __lll_robust_lock()
144 val = *iptr; in __lll_robust_lock()
145 if (!val && atomic_compare_and_exchange_bool_acq (iptr, id, 0) == 0) in __lll_robust_lock()
147 else if (val && !valid_pid (val & LLL_OWNER_MASK)) in __lll_robust_lock()
149 if (atomic_compare_and_exchange_bool_acq (iptr, id, val) == 0) in __lll_robust_lock()
154 __lll_timed_wait (iptr, val, wait_time, flags); in __lll_robust_lock()
168 unsigned int val; in __lll_robust_abstimed_lock() local
175 val = *iptr; in __lll_robust_abstimed_lock()
176 if (!val && atomic_compare_and_exchange_bool_acq (iptr, id, 0) == 0) in __lll_robust_abstimed_lock()
179 val | LLL_WAITERS, val) == 0) in __lll_robust_abstimed_lock()
185 val = *iptr; in __lll_robust_abstimed_lock()
186 if (!val && atomic_compare_and_exchange_bool_acq (iptr, id, 0) == 0) in __lll_robust_abstimed_lock()
188 else if (val && !valid_pid (val & LLL_OWNER_MASK)) in __lll_robust_abstimed_lock()
190 if (atomic_compare_and_exchange_bool_acq (iptr, id, val) == 0) in __lll_robust_abstimed_lock()
201 int res = __lll_timed_wait (iptr, val, mlsec, flags); in __lll_robust_abstimed_lock()
215 unsigned int val = *iptr; in __lll_robust_trylock() local
217 if (!val) in __lll_robust_trylock()
222 else if (!valid_pid (val & LLL_OWNER_MASK) in __lll_robust_trylock()
223 && atomic_compare_and_exchange_bool_acq (iptr, id, val) == 0) in __lll_robust_trylock()
232 unsigned int val = atomic_load_relaxed ((unsigned int *)ptr); in __lll_robust_unlock() local
235 if (val & LLL_WAITERS) in __lll_robust_unlock()
240 else if (atomic_compare_exchange_weak_release ((unsigned int *)ptr, &val, 0)) in __lll_robust_unlock()