Lines Matching refs:count
15 * __mutex_fastpath_lock - try to take the lock by moving the count
17 * @count: pointer of type atomic_t
20 * Change the count from 1 to a value lower than 1, and call <fn> if it
24 #define __mutex_fastpath_lock(count, fail_fn) \
28 typecheck(atomic_t *, count); \
36 : "a" (count) \
42 * __mutex_fastpath_lock_retval - try to take the lock by moving the count
44 * @count: pointer of type atomic_t
47 * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
51 static inline int __mutex_fastpath_lock_retval(atomic_t *count,
54 if (unlikely(atomic_dec_return(count) < 0))
55 return fail_fn(count);
62 * @count: pointer of type atomic_t
73 #define __mutex_fastpath_unlock(count, fail_fn) \
77 typecheck(atomic_t *, count); \
85 : "a" (count) \
94 * @count: pointer of type atomic_t
97 * Change the count from 1 to a value lower than 1, and return 0 (failure)
103 static inline int __mutex_fastpath_trylock(atomic_t *count,
117 if (likely(atomic_cmpxchg(count, 1, 0) == 1))
121 return fail_fn(count);