Lines Matching refs:count
12 * __mutex_fastpath_lock - try to take the lock by moving the count
14 * @count: pointer of type atomic_t
17 * Change the count from 1 to a value lower than 1, and call <fail_fn> if
22 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
24 if (unlikely(ia64_fetchadd4_acq(count, -1) != 1))
25 fail_fn(count);
29 * __mutex_fastpath_lock_retval - try to take the lock by moving the count
31 * @count: pointer of type atomic_t
34 * Change the count from 1 to a value lower than 1, and call <fail_fn> if
39 __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
41 if (unlikely(ia64_fetchadd4_acq(count, -1) != 1))
42 return fail_fn(count);
47 * __mutex_fastpath_unlock - try to promote the count from 0 to 1
48 * @count: pointer of type atomic_t
51 * Try to promote the count from 0 to 1. If it wasn't 0, call <fail_fn>.
60 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
62 int ret = ia64_fetchadd4_rel(count, 1);
64 fail_fn(count);
72 * @count: pointer of type atomic_t
75 * Change the count from 1 to a value lower than 1, and return 0 (failure)
85 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
87 if (cmpxchg_acq(count, 1, 0) == 1)