Lines Matching refs:p_data
45 uint32_t nrfx_atomic_u32_fetch_store(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_store() argument
48 return __atomic_exchange_n(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_store()
52 NRFX_ATOMIC_OP(mov, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_store()
57 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_store()
58 *p_data = value; in nrfx_atomic_u32_fetch_store()
64 uint32_t nrfx_atomic_u32_store(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_store() argument
67 __atomic_store_n(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_store()
72 NRFX_ATOMIC_OP(mov, old_val, new_val, p_data, value); in nrfx_atomic_u32_store()
77 *p_data = value; in nrfx_atomic_u32_store()
83 uint32_t nrfx_atomic_u32_fetch_or(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_or() argument
86 return __atomic_fetch_or(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_or()
90 NRFX_ATOMIC_OP(orr, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_or()
95 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_or()
96 *p_data |= value; in nrfx_atomic_u32_fetch_or()
102 uint32_t nrfx_atomic_u32_or(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_or() argument
105 return __atomic_or_fetch(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_or()
109 NRFX_ATOMIC_OP(orr, old_val, new_val, p_data, value); in nrfx_atomic_u32_or()
114 *p_data |= value; in nrfx_atomic_u32_or()
115 uint32_t new_value = *p_data; in nrfx_atomic_u32_or()
121 uint32_t nrfx_atomic_u32_fetch_and(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_and() argument
124 return __atomic_fetch_and(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_and()
128 NRFX_ATOMIC_OP(and, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_and()
133 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_and()
134 *p_data &= value; in nrfx_atomic_u32_fetch_and()
140 uint32_t nrfx_atomic_u32_and(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_and() argument
143 return __atomic_and_fetch(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_and()
147 NRFX_ATOMIC_OP(and, old_val, new_val, p_data, value); in nrfx_atomic_u32_and()
152 *p_data &= value; in nrfx_atomic_u32_and()
153 uint32_t new_value = *p_data; in nrfx_atomic_u32_and()
159 uint32_t nrfx_atomic_u32_fetch_xor(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_xor() argument
162 return __atomic_fetch_xor(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_xor()
166 NRFX_ATOMIC_OP(eor, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_xor()
171 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_xor()
172 *p_data ^= value; in nrfx_atomic_u32_fetch_xor()
178 uint32_t nrfx_atomic_u32_xor(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_xor() argument
181 return __atomic_xor_fetch(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_xor()
185 NRFX_ATOMIC_OP(eor, old_val, new_val, p_data, value); in nrfx_atomic_u32_xor()
190 *p_data ^= value; in nrfx_atomic_u32_xor()
191 uint32_t new_value = *p_data; in nrfx_atomic_u32_xor()
197 uint32_t nrfx_atomic_u32_fetch_add(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_add() argument
200 return __atomic_fetch_add(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_add()
204 NRFX_ATOMIC_OP(add, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_add()
209 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_add()
210 *p_data += value; in nrfx_atomic_u32_fetch_add()
216 uint32_t nrfx_atomic_u32_add(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_add() argument
219 return __atomic_add_fetch(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_add()
223 NRFX_ATOMIC_OP(add, old_val, new_val, p_data, value); in nrfx_atomic_u32_add()
228 *p_data += value; in nrfx_atomic_u32_add()
229 uint32_t new_value = *p_data; in nrfx_atomic_u32_add()
235 uint32_t nrfx_atomic_u32_fetch_sub(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_sub() argument
238 return __atomic_fetch_sub(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_fetch_sub()
242 NRFX_ATOMIC_OP(sub, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_sub()
247 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_sub()
248 *p_data -= value; in nrfx_atomic_u32_fetch_sub()
254 uint32_t nrfx_atomic_u32_sub(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_sub() argument
257 return __atomic_sub_fetch(p_data, value, __ATOMIC_SEQ_CST); in nrfx_atomic_u32_sub()
261 NRFX_ATOMIC_OP(sub, old_val, new_val, p_data, value); in nrfx_atomic_u32_sub()
266 *p_data -= value; in nrfx_atomic_u32_sub()
267 uint32_t new_value = *p_data; in nrfx_atomic_u32_sub()
273 bool nrfx_atomic_u32_cmp_exch(nrfx_atomic_u32_t * p_data, in nrfx_atomic_u32_cmp_exch() argument
278 return __atomic_compare_exchange(p_data, in nrfx_atomic_u32_cmp_exch()
285 return nrfx_atomic_internal_cmp_exch(p_data, p_expected, desired); in nrfx_atomic_u32_cmp_exch()
289 if (*p_data == *p_expected) in nrfx_atomic_u32_cmp_exch()
291 *p_data = desired; in nrfx_atomic_u32_cmp_exch()
296 *p_expected = *p_data; in nrfx_atomic_u32_cmp_exch()
304 uint32_t nrfx_atomic_u32_fetch_sub_hs(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_fetch_sub_hs() argument
307 uint32_t expected = *p_data; in nrfx_atomic_u32_fetch_sub_hs()
318 } while (!__atomic_compare_exchange(p_data, &expected, &new_val, in nrfx_atomic_u32_fetch_sub_hs()
324 NRFX_ATOMIC_OP(sub_hs, old_val, new_val, p_data, value); in nrfx_atomic_u32_fetch_sub_hs()
329 uint32_t old_val = *p_data; in nrfx_atomic_u32_fetch_sub_hs()
330 *p_data -= value; in nrfx_atomic_u32_fetch_sub_hs()
336 uint32_t nrfx_atomic_u32_sub_hs(nrfx_atomic_u32_t * p_data, uint32_t value) in nrfx_atomic_u32_sub_hs() argument
339 uint32_t expected = *p_data; in nrfx_atomic_u32_sub_hs()
350 } while (!__atomic_compare_exchange(p_data, &expected, &new_val, in nrfx_atomic_u32_sub_hs()
356 NRFX_ATOMIC_OP(sub_hs, old_val, new_val, p_data, value); in nrfx_atomic_u32_sub_hs()
361 *p_data -= value; in nrfx_atomic_u32_sub_hs()
362 uint32_t new_value = *p_data; in nrfx_atomic_u32_sub_hs()
368 uint32_t nrfx_atomic_flag_set_fetch(nrfx_atomic_flag_t * p_data) in nrfx_atomic_flag_set_fetch() argument
370 return nrfx_atomic_u32_fetch_or(p_data, 1); in nrfx_atomic_flag_set_fetch()
373 uint32_t nrfx_atomic_flag_set(nrfx_atomic_flag_t * p_data) in nrfx_atomic_flag_set() argument
375 return nrfx_atomic_u32_or(p_data, 1); in nrfx_atomic_flag_set()
378 uint32_t nrfx_atomic_flag_clear_fetch(nrfx_atomic_flag_t * p_data) in nrfx_atomic_flag_clear_fetch() argument
380 return nrfx_atomic_u32_fetch_and(p_data, 0); in nrfx_atomic_flag_clear_fetch()
383 uint32_t nrfx_atomic_flag_clear(nrfx_atomic_flag_t * p_data) in nrfx_atomic_flag_clear() argument
385 return nrfx_atomic_u32_and(p_data, 0); in nrfx_atomic_flag_clear()