Lines Matching +full:32 +full:- +full:bits
1 // SPDX-License-Identifier: CDDL-1.0
11 * or https://opensource.org/licenses/CDDL-1.0.
41 ATOMIC_INC(32, uint32_t)
57 ATOMIC_DEC(32, uint32_t)
66 void atomic_add_##name(volatile type1 *target, type2 bits) \
68 (void) __atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST); \
72 atomic_add_ptr(volatile void *target, ssize_t bits)
74 (void) __atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
79 ATOMIC_ADD(32, uint32_t, int32_t)
88 void atomic_sub_##name(volatile type1 *target, type2 bits) \ in ATOMIC_ADD()
90 (void) __atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST); \ in ATOMIC_ADD()
94 atomic_sub_ptr(volatile void *target, ssize_t bits)
96 (void) __atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
101 ATOMIC_SUB(32, uint32_t, int32_t)
110 void atomic_or_##name(volatile type *target, type bits) \ in ATOMIC_SUB()
112 (void) __atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST); \ in ATOMIC_SUB()
117 ATOMIC_OR(32, uint32_t)
126 void atomic_and_##name(volatile type *target, type bits) \
128 (void) __atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST); \
133 ATOMIC_AND(32, uint32_t)
153 ATOMIC_INC_NV(32, uint32_t)
169 ATOMIC_DEC_NV(32, uint32_t)
178 type1 atomic_add_##name##_nv(volatile type1 *target, type2 bits) \
180 return (__atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST)); \
184 atomic_add_ptr_nv(volatile void *target, ssize_t bits)
186 return (__atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
191 ATOMIC_ADD_NV(32, uint32_t, int32_t)
200 type1 atomic_sub_##name##_nv(volatile type1 *target, type2 bits) \ in ATOMIC_ADD_NV()
202 return (__atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST)); \ in ATOMIC_ADD_NV()
206 atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
208 return (__atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
215 ATOMIC_SUB_NV(32, uint32_t, int32_t) in ATOMIC_SUB_NV()
222 type atomic_or_##name##_nv(volatile type *target, type bits) \ in ATOMIC_SUB_NV()
224 return (__atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST)); \ in ATOMIC_SUB_NV()
229 ATOMIC_OR_NV(32, uint32_t)
238 type atomic_and_##name##_nv(volatile type *target, type bits) \
240 return (__atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST)); \
245 ATOMIC_AND_NV(32, uint32_t)
257 * from https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html:
282 ATOMIC_CAS(32, uint32_t)
295 type atomic_swap_##name(volatile type *target, type bits) \ in ATOMIC_CAS()
297 return (__atomic_exchange_n(target, bits, __ATOMIC_SEQ_CST)); \ in ATOMIC_CAS()
302 ATOMIC_SWAP(32, uint32_t)
310 atomic_swap_ptr(volatile void *target, void *bits)
312 return (__atomic_exchange_n((void **)target, bits, __ATOMIC_SEQ_CST));
323 atomic_store_64(volatile uint64_t *target, uint64_t bits) in atomic_store_64() argument
325 return (__atomic_store_n(target, bits, __ATOMIC_RELAXED)); in atomic_store_64()
334 return ((old & bit) ? -1 : 0); in atomic_set_long_excl()
342 return ((old & bit) ? 0 : -1); in atomic_clear_long_excl()