Lines Matching +full:16 +full:- +full:bits

10  * or https://opensource.org/licenses/CDDL-1.0.
39 ATOMIC_INC(16, uint16_t)
55 ATOMIC_DEC(16, uint16_t)
65 void atomic_add_##name(volatile type1 *target, type2 bits) \
67 (void) __atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST); \
71 atomic_add_ptr(volatile void *target, ssize_t bits)
73 (void) __atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
77 ATOMIC_ADD(16, uint16_t, int16_t)
87 void atomic_sub_##name(volatile type1 *target, type2 bits) \
89 (void) __atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST); \
93 atomic_sub_ptr(volatile void *target, ssize_t bits)
95 (void) __atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
99 ATOMIC_SUB(16, uint16_t, int16_t)
109 void atomic_or_##name(volatile type *target, type bits) \
111 (void) __atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST); \
115 ATOMIC_OR(16, uint16_t)
125 void atomic_and_##name(volatile type *target, type bits) \
127 (void) __atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST); \
131 ATOMIC_AND(16, uint16_t)
151 ATOMIC_INC_NV(16, uint16_t)
167 ATOMIC_DEC_NV(16, uint16_t)
177 type1 atomic_add_##name##_nv(volatile type1 *target, type2 bits) \
179 return (__atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST)); \
183 atomic_add_ptr_nv(volatile void *target, ssize_t bits)
185 return (__atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
189 ATOMIC_ADD_NV(16, uint16_t, int16_t)
199 type1 atomic_sub_##name##_nv(volatile type1 *target, type2 bits) \
201 return (__atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST)); \
205 atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
207 return (__atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
212 ATOMIC_SUB_NV(16, uint16_t, int16_t)
221 type atomic_or_##name##_nv(volatile type *target, type bits) \
223 return (__atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST)); \
227 ATOMIC_OR_NV(16, uint16_t)
237 type atomic_and_##name##_nv(volatile type *target, type bits) \
239 return (__atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST)); \
243 ATOMIC_AND_NV(16, uint16_t)
256 * from https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html:
280 ATOMIC_CAS(16, uint16_t)
294 type atomic_swap_##name(volatile type *target, type bits) \
296 return (__atomic_exchange_n(target, bits, __ATOMIC_SEQ_CST)); \
300 ATOMIC_SWAP(16, uint16_t)
309 atomic_swap_ptr(volatile void *target, void *bits)
311 return (__atomic_exchange_n((void **)target, bits, __ATOMIC_SEQ_CST));
322 atomic_store_64(volatile uint64_t *target, uint64_t bits)
324 return (__atomic_store_n(target, bits, __ATOMIC_RELAXED));
333 return ((old & bit) ? -1 : 0);
341 return ((old & bit) ? 0 : -1);