Lines Matching refs:count
20 * Note that any negative value of count is equivalent to 0,
24 atomic_t count;
30 .count = ATOMIC_INIT(n), \
34 #define __DECLARE_SEMAPHORE_GENERIC(name, count) \
35 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
42 atomic_set(&sem->count, val);
67 if (unlikely(atomic_dec_return(&sem->count) < 0))
77 if (unlikely(atomic_dec_return(&sem->count) < 0))
84 return atomic_dec_if_positive(&sem->count) < 0;
89 if (unlikely(atomic_inc_return(&sem->count) <= 0))