Lines Matching full:value
30 * value of @a target equals @a old_value, @a target is set to @a new_value.
31 * If the current value of @a target does not equal @a old_value, @a target
35 * @param old_value Original value to compare against.
36 * @param new_value New value to store.
54 * @param value Value to add.
56 * @return Previous value of @a target.
58 static inline atomic_val_t atomic_add(atomic_t *target, atomic_val_t value) in atomic_add() argument
60 return __atomic_fetch_add(target, value, __ATOMIC_SEQ_CST); in atomic_add()
70 * @param value Value to subtract.
72 * @return Previous value of @a target.
75 static inline atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value) in atomic_sub() argument
77 return __atomic_fetch_sub(target, value, __ATOMIC_SEQ_CST); in atomic_sub()
88 * @return Previous value of @a target.
104 * @return Previous value of @a target.
120 * @return Value of @a target.
132 * This routine atomically sets @a target to @a value and returns
133 * the previous value of @a target.
136 * @param value Value to write to @a target.
138 * @return Previous value of @a target.
141 static inline atomic_val_t atomic_set(atomic_t *target, atomic_val_t value) in atomic_set() argument
145 * writes value into *ptr, and returns the previous contents of *ptr. in atomic_set()
147 return __atomic_exchange_n(target, value, __ATOMIC_SEQ_CST); in atomic_set()
155 * value. (Hence, it is equivalent to atomic_set(target, 0).)
159 * @return Previous value of @a target.
172 * @a target and @a value.
175 * @param value Value to OR.
177 * @return Previous value of @a target.
180 static inline atomic_val_t atomic_or(atomic_t *target, atomic_val_t value) in atomic_or() argument
182 return __atomic_fetch_or(target, value, __ATOMIC_SEQ_CST); in atomic_or()
190 * @a target and @a value.
193 * @param value Value to XOR
195 * @return Previous value of @a target.
198 static inline atomic_val_t atomic_xor(atomic_t *target, atomic_val_t value) in atomic_xor() argument
200 return __atomic_fetch_xor(target, value, __ATOMIC_SEQ_CST); in atomic_xor()
208 * and @a value.
211 * @param value Value to AND.
213 * @return Previous value of @a target.
216 static inline atomic_val_t atomic_and(atomic_t *target, atomic_val_t value) in atomic_and() argument
218 return __atomic_fetch_and(target, value, __ATOMIC_SEQ_CST); in atomic_and()
226 * and @a value. (This operation is equivalent to target = ~(target & value).)
229 * @param value Value to NAND.
231 * @return Previous value of @a target.
234 static inline atomic_val_t atomic_nand(atomic_t *target, atomic_val_t value) in atomic_nand() argument
236 return __atomic_fetch_nand(target, value, __ATOMIC_SEQ_CST); in atomic_nand()
245 * @param i Value to assign to atomic variable.
299 * Atomically clear bit number @a bit of @a target and return its old value.
321 * Atomically set bit number @a bit of @a target and return its old value.