Lines Matching refs:count
22 atomic_t count;
29 .count = ATOMIC_INIT(n), \
34 #define __DECLARE_SEMAPHORE_GENERIC(name,count) \
35 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
48 atomic_set(&sem->count, val);
74 * Atomically decrement the semaphore's count. If it goes negative,
80 if (unlikely(atomic_dec_return(&sem->count) < 0))
93 if (unlikely(atomic_dec_return(&sem->count) < 0))
106 long count;
116 : "=&r" (count)
117 : "r" (&sem->count)
125 if (unlikely(count < 0))
139 if (unlikely(atomic_inc_return(&sem->count) <= 0))