Lines Matching defs:count
98 atomic_long_set(&data->count, start_count);
141 ref->percpu_count_ptr |= atomic_long_read(&ref->data->count) <<
174 unsigned long count = 0;
178 count += *per_cpu_ptr(percpu_count, cpu);
181 atomic_long_read(&data->count), count);
185 * to &ref->count; since gets could be happening on one cpu while puts
186 * happen on another, adding a single cpu's count could cause
187 * @ref->count to hit 0 before we've got a consistent value - but the
190 * Subtracting the bias value then has to happen _after_ adding count to
191 * &ref->count; we need the bias value to prevent &ref->count from
195 atomic_long_add((long)count - PERCPU_COUNT_BIAS, &data->count);
197 if (WARN_ONCE(atomic_long_read(&data->count) <= 0,
199 data->release, atomic_long_read(&data->count)) &&
250 atomic_long_add(PERCPU_COUNT_BIAS, &ref->data->count);
413 unsigned long count, flags;
421 count = atomic_long_read(&ref->data->count);
423 count = ref->percpu_count_ptr >> __PERCPU_REF_FLAG_BITS;
426 return count == 0;