Lines Matching refs:count
16 * __mutex_fastpath_lock - try to take the lock by moving the count
18 * @count: pointer of type atomic_t
21 * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
26 __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *))
28 if (unlikely(atomic_xchg(count, 0) != 1))
29 fail_fn(count);
35 * __mutex_fastpath_lock_retval - try to take the lock by moving the count
37 * @count: pointer of type atomic_t
40 * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
45 __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *))
47 if (unlikely(atomic_xchg(count, 0) != 1))
48 return fail_fn(count);
57 * @count: pointer of type atomic_t
68 __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *))
71 if (unlikely(atomic_xchg(count, 1) != 0))
72 fail_fn(count);
80 * @count: pointer of type atomic_t
83 * Change the count from 1 to a value lower than 1, and return 0 (failure)
93 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
95 int prev = atomic_xchg(count, 0);
109 prev = atomic_xchg(count, prev);