Lines Matching refs:old_value

144   unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed);  in __sem_dec()  local
145 unsigned int shared = old_value & SEMCOUNT_SHARED_MASK; in __sem_dec()
152 if (SEMCOUNT_TO_VALUE(old_value) < 0) { in __sem_dec()
155 } while (!atomic_compare_exchange_weak(sem_count_ptr, &old_value, in __sem_dec()
156 SEMCOUNT_DECREMENT(old_value) | shared)); in __sem_dec()
158 return SEMCOUNT_TO_VALUE(old_value); in __sem_dec()
164 unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed); in __sem_trydec() local
165 unsigned int shared = old_value & SEMCOUNT_SHARED_MASK; in __sem_trydec()
172 if (SEMCOUNT_TO_VALUE(old_value) <= 0) { in __sem_trydec()
175 } while (!atomic_compare_exchange_weak(sem_count_ptr, &old_value, in __sem_trydec()
176 SEMCOUNT_DECREMENT(old_value) | shared)); in __sem_trydec()
178 return SEMCOUNT_TO_VALUE(old_value); in __sem_trydec()
188 unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed); in __sem_inc() local
189 unsigned int shared = old_value & SEMCOUNT_SHARED_MASK; in __sem_inc()
198 if (SEMCOUNT_TO_VALUE(old_value) == SEM_VALUE_MAX) { in __sem_inc()
203 if (SEMCOUNT_TO_VALUE(old_value) < 0) { in __sem_inc()
206 new_value = SEMCOUNT_INCREMENT(old_value) | shared; in __sem_inc()
208 } while (!atomic_compare_exchange_weak(sem_count_ptr, &old_value, in __sem_inc()
211 return SEMCOUNT_TO_VALUE(old_value); in __sem_inc()
293 int old_value = __sem_inc(sem_count_ptr); in sem_post() local
294 if (old_value < 0) { in sem_post()
297 } else if (old_value == SEM_VALUE_MAX) { in sem_post()