Lines Matching refs:count
34 * Note that any negative value of count is equivalent to 0,
38 atomic_t count;
44 .count = ATOMIC_INIT(n), \
48 #define __DECLARE_SEMAPHORE_GENERIC(name, count) \
49 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
56 atomic_set(&sem->count, val);
81 if (unlikely(atomic_dec_return(&sem->count) < 0))
91 if (unlikely(atomic_dec_return(&sem->count) < 0))
98 return atomic_dec_if_positive(&sem->count) < 0;
103 if (unlikely(atomic_inc_return(&sem->count) <= 0))