Lines Matching refs:count
10 * The MSW of the count is the negated number of active writers and
13 * The lock count is initialized to 0 (no active and no waiting lockers).
37 signed long count;
64 sem->count = RWSEM_UNLOCKED_VALUE;
75 long result = ia64_fetchadd8_acq((unsigned long *)&sem->count, 1);
90 old = sem->count;
92 } while (cmpxchg_acq(&sem->count, old, new) != old);
104 long result = ia64_fetchadd8_rel((unsigned long *)&sem->count, -1);
119 old = sem->count;
121 } while (cmpxchg_rel(&sem->count, old, new) != old);
134 while ((tmp = sem->count) >= 0) {
135 if (tmp == cmpxchg_acq(&sem->count, tmp, tmp+1)) {
148 long tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE,
162 old = sem->count;
164 } while (cmpxchg_rel(&sem->count, old, new) != old);
174 #define rwsem_atomic_add(delta, sem) atomic64_add(delta, (atomic64_t *)(&(sem)->count))
175 #define rwsem_atomic_update(delta, sem) atomic64_add_return(delta, (atomic64_t *)(&(sem)->count))
179 return (sem->count != 0);